Hello
i run a playbook and do get this error message
:/etc/ansible$ ansible-playbook -u dokuwa1 --ask-pass playbook/apache.yml
ERROR! Syntax Error while loading YAML.
The error appears to have been in ‘/etc/ansible/playbook/apache.yml’: line 3, column 2, but may
be elsewhere in the file depending on the exact syntax problem.
It is not retrieving this error
but there is one thing i expect it not to ask me for my username and password
I thought that variable should take care of that
what am i doing wrong
It is not retrieving this error
but there is one thing i expect it not to ask me for my username and password
I thought that variable should take care of that
what am i doing wrong
The issue is that your yaml file is malformed, so Ansible doesn’t understand it. For just getting started/testing things out, the easiest is probably to put the password in your inventory file. I would recommend reading up on that here: http://docs.ansible.com/ansible/intro_inventory.html, especially the section “list-of-behavioral-inventory-parameters”.
I still have issues with password
i have added username and password to the inventory file and have used yamllink to validate my yaml
at the command line i have to request for password all the time
ansible_connection=ssh
ansible_port=22
ansible_user=dokuwa1
ansible_ssh_pass=xxxx
My command is without password is
ansible-playbook -playbook/apache.yml - it fails
and with username password
ansible-playbook -u dokuwa1 --ask-pass playbook/apache.yml - it does not fail
Yes it looks very good yamllint.com i have tried it
but also still having issues with password and username
i want a situation where it does not ask me for my username & password
Yes thanks
i was able to resolve the issue of prompting password for my user i had to go to ansible.cfg and change the ask-pass value to false
but the only issue is that i could not do this for root as i need the password prompt to install some packages
Is there any way out for root or sudo
Thanks