Trying to run a playbook to add a user on a windows server and getting errors, see below
[root@localhost group_vars]# ansible-playbook createuser.yml
ERROR! Syntax Error while loading YAML.
The error appears to have been in '/etc/ansible/group_vars/createuser.yml': line 2, column 1, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
I have a /etc/ansible/group_vars/windows.yml setup as follows
ansible_ssh_user: Administrator
ansible_ssh_pass: Liverpool27
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
I have a /etc/ansible/group_vars/createuser.yml as follows
Also have a hosts file setup under /etc/ansible/hosts
When I run the command manually with the one liner it works fine -
ansible windows --module-name=win_user --args="name=ansible password=fooBar1+3"
If I try and run it with the following it still doesnt work -> ansible-playbook -i 10.10.128.0 createuser.yml
Suggestions welcome... Thanks