During the provisioning of a Digital Ocean instance when running the command $ ansible-playbook -i hosts/production server.yml
-K
I get the following error:
TASK: [users | Add web user sudoers items for services] ***********************
failed: [102.XX.XX.XX] => {"failed": true}
msg: failed to validate: rc:1 error:>>> /root/.ansible/tmp/ansible-tmp-1446586517.73-164968937048464/source: syntax error near line 3 <<<
>>> /root/.ansible/tmp/ansible-tmp-1446586517.73-164968937048464/source: syntax error near line 4 <<<
>>> /root/.ansible/tmp/ansible-tmp-1446586517.73-164968937048464/source: syntax error near line 5 <<<
>>> /root/.ansible/tmp/ansible-tmp-1446586517.73-164968937048464/source: syntax error near line 5 <<<
>>> /root/.ansible/tmp/ansible-tmp-1446586517.73-164968937048464/source: syntax error near line 6 <<<
>>> /root/.ansible/tmp/ansible-tmp-1446586517.73-164968937048464/source: syntax error near line 6 <<<
I’m lost for ideas on how to get around this error.
I’ve made sure I created a sudoer_password (for both a admin & web user (web user -> I believe wasn’t necessary)) by running the command:
$ python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.encrypt(getpass.getpass())"
- ENTER PASSWORD
$ RETURN SHA
PASTE SHA in vars/sudoers_password.yml
I’ve tried setting:
security.yml ---> sshd_permit_root_login: true
as well as security.yml ---> sshd_permit_root_login: false
I’m able to to ssh in as root and admin. However, shouldn’t ssh for the root account be disabled and only the admin be able to ssh?
Anyways…
Please reply back with some guidance. Thanks in advance!