ansible/ansible — pull request #7196 by whiskybar (2014-04-28 19:46:36+00:00)
Title: New files inaccessible (0600)

##### Issue Type:

Bugfix Pull Request

##### Ansible Version:

ansible 1.5.4

##### Environment:

Ubuntu 12.04, all

##### Summary:

Following 898a38b074f2561d19059315030b2b5da68a4f34, all newly created files are 0600 but should be 0644 as before (i.e. by umask)

##### Steps To Reproduce:

echo HOSTNAME >/tmp/hosts
ansible HOSTNAME -i /tmp/hosts -m copy -a 'content=hello dest=/tmp/1'

##### Expected Results:

"mode": "0644"

usually and driven by umask. This was in Ansible before the commit.

##### Actual Results:

"mode": "0600"

driven by the `tempfile.NamedTemporaryFile` behavior: making a temporary file private for the creator. This behavior after the commit did and will break previous playbooks for many users.