Permalink
Browse files

work around ansible 2.5 'become' breakage

I can't find anything in the release notes, but Ansible 2.5 changed
*something* with playbooks running as root and 'become'ing a regular user to
copy files. Pasting the error here for other poor bastards googling:

failed: [lobsters.xen.prgmr.com] (item={'file': 'ssh/known_hosts', 'mode': '0600'}) => {"item": {"file": "ssh/known_hosts", "mode": "0600"}, "msg": "Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo ~None/.ansible/tmp/ansible-tmp-1527081889.4756002-145395363159875 `\" && echo ansible-tmp-1527081889.4756002-145395363159875=\"` echo ~None/.ansible/tmp/ansible-tmp-1527081889.4756002-145395363159875 `\" ), exited with result 1", "unreachable": true}
  • Loading branch information...
pushcx committed May 23, 2018
1 parent 58aceaa commit 8217190a6720aa97b1f508afe1e64f98310c394c
Showing with 1 addition and 0 deletions.
  1. +1 −0 ansible.cfg
View
@@ -2,6 +2,7 @@
inventory = ./inventories/prod.ini
log_path = ./lobsters-ansible.log
callback_whitelist = profile_tasks
+remote_tmp = /tmp/ansible
[ssh_connection]
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey

0 comments on commit 8217190

Please sign in to comment.