I understand I can become root on my centos vm by first typing sudo -i. This does not look to be helpful when trying to run a playbook for Ansible however. I am wondering how I would get the following to work. I created a playbook on a centos Ansible controller which is meant to reach out to multiple vms at once to run tasks. Within the host file that the playbook uses you put a login that will be used to remotely connect to the vm's. When running my playbook it keeps telling me I need to be logged in as root. So for this task, it looks like I need to put in the actual root pw into my playbook. So even though my prompt shows [root@AnsibleController ansible]#, when running the following command ...
[root@AnsibleController ansible]# sudo ansible-playbook ilovenano.yml
I get an error still saying - fatal: [52.255.151.192]: UNREACHABLE! => {"changed": false, "msg": "Invalid/incorrect password: Permission denied, please try again.", "unreachable": true}