Hi,
I’m running an ansible 2 playbook against an EC2 inventory.
It installs wordpress and apache on an EC2 instance.
Here’s the command I used:
$ ansible-playbook -i ec2.py site.yml
I get this error:
`
PLAY [install apache, php, mysql server, wordpress] ****************************
TASK [setup] *******************************************************************
fatal: [52.62.169.76]: UNREACHABLE! => {“changed”: false, “msg”: “SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue”, “unreachable”: true}
ok: [52.87.100.226]
TASK [web : install apache, php, and php-mysql] ********************************
changed: [52.87.100.226] => (item=[u’httpd’, u’php’, u’php-mysql’])
TASK [web : start and enable httpd] ********************************************
changed: [52.87.100.226]
TASK [mysql : install mysql server] ********************************************
changed: [52.87.100.226] => (item=[u’mysql-server’, u’MySQL-python’])
TASK [mysql : create mysql configuration file] *********************************
changed: [52.87.100.226]
TASK [mysql : start mysql service] *********************************************
changed: [52.87.100.226]
TASK [wordpress : download wordpress] ******************************************
changed: [52.87.100.226]
TASK [wordpress : extract wordpress archive] ***********************************
changed: [52.87.100.226]
[WARNING]: Consider using unarchive module rather than running tar
TASK [wordpress : copy wordpress to apache root directory] *********************
changed: [52.87.100.226]
TASK [wordpress : fetch random salts for wordpress config] *********************
fatal: [52.87.100.226 → localhost]: FAILED! => {“changed”: false, “failed”: true, “module_stderr”: “sudo: a password is required\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE”, “parsed”: false}
NO MORE HOSTS LEFT *************************************************************
RUNNING HANDLER [mysql : restart mysql] ****************************************
to retry, use: --limit @site.retry
`
Here’s the source code of the roles I’, using:
https://github.com/badri/ansible-for-aws/tree/zone-changes/wordpress
Am I missing any step or configuration?
Thanks
Lakshmi