On Tue, 19 Sep 2017 10:13:37 -0700 (PDT)
Dave Florek <[email protected]> wrote:

> *Error message I get at execution:*
> 
> ERROR! Syntax Error while loading YAML.
> 
> 
> The error appears to have been in 
> '/opt/ansible/setup_scripts/create_user.yml': line 20, column 1, but
> may be elsewhere in the file depending on the exact syntax problem.

It can easily happen to be an issue elsewhere in the file, but it's
hard to tell since you posted only a very small snippet.

If you comment-out that particular task do you still have the same
issue being reported?

I would double-check the indentation as well, since what you posted as
sample had a bit "deeper" indentation (maybe tabs vs spaces or too much
indentation).

What version of Ansible are you using?

> The offending line appears to be:
> 
> 
>   - lineinfile:
>         path: /home/"{{ new_user_acct_name }}"/.ssh/authorized_keys

Any reason you wouldn't be using authorized_key module
(http://docs.ansible.com/ansible/latest/authorized_key_module.html)?

Best regards

-- 
Branko Majic
XMPP: [email protected]
Please use only Free formats when sending attachments to me.

Бранко Мајић
XMPP: [email protected]
Молим вас да додатке шаљете искључиво у слободним форматима.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20170921120110.5e7791f1%40majic.rs.
For more options, visit https://groups.google.com/d/optout.

Reply via email to