thanks it worked
But also how can i use ansible without prompting me for a password
and also another issue with ansible i am getting this error when running this adhoc command from the command line
kuwa@ubuntu:/etc/ansible$ ansible all -i hosts -u dokuwa1 --ask-pass -m yum -a “name=httpd state=present” --become-user=root --ask-become-pass
SSH password:
SUDO password[defaults to SSH password]:
192.168.85.129 | FAILED! => {
“changed”: false,
“failed”: true,
“msg”: “python2 bindings for rpm are needed for this module. python2 yum module is needed for this module”
ansible_ssh_pass, ssh key without password, ssh key with password and ssh-agent.
What you can use depends on you requirement since some of them has security implication.