I trying to use ansible-pull to configure a RHEL 7 machine and get the following error.
vm-stg05 | FAILED! => {
"changed": false,
"cmd": "/usr/bin/git clone --origin origin 'ssh:********@vm-util01:/srv/git/applications.git' /var/lib/ansible/local",
"msg": "fatal: cannot exec '/tmp/tmpU255JD': Permission denied\nfatal: unable to fork",
"rc": 128,
"stderr": "fatal: cannot exec '/tmp/tmpU255JD': Permission denied\nfatal: unable to fork\n",
"stderr_lines": [
"fatal: cannot exec '/tmp/tmpU255JD': Permission denied",
"fatal: unable to fork"
],
"stdout": "Cloning into '/var/lib/ansible/local'...\n",
"stdout_lines": [
"Cloning into '/var/lib/ansible/local'..."
]
}
This is a work box and is fairly locked down so I am assuming executing anything in /tmp
is forbidden so I tried overriding the location and did not see any difference.
My first attempt was to accept the default setting. I have to run the command with dzdo
(which is a Centrify command similar to sudo
) and root
is homeless so I was not surprised it failed. What bothered me was that it was still using /tmp
$ grep _tmp $ANSIBLE_CONFIG | egrep -v "^#"
remote_tmp = ~/.ansible/tmp
local_tmp = ~/.ansible/tmp
My second attempt was to create a directory.
$ grep _tmp $ANSIBLE_CONFIG | egrep -v "^#"
remote_tmp = /var/lib/ansible/tmp
local_tmp = /var/lib/ansible/tmp
$ ls -l /var/lib/ansible
total 4
-rwxr-x--- 1 root somegroup 576 Mar 12 12:51 ansiblePull.sh
drwxrwxrwx 2 root somegroup 6 Mar 12 14:08 tmp
The original error message is the output of running it with /var/lib/ansible/tmp
.
$ ansible-pull --version
ansible-pull 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/wstrater/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible-pull
python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
I even tried it as a normal user in the /etc/sudoers
file with and without sudo
since this where I want to end up.
ls -l /var/lib/ansible/
total 4
-rwxr-x--- 1 somebody somegroup 576 Mar 12 12:51 ansiblePull.sh
drwxrwxrwx 2 somebody somegroup 6 Mar 12 14:37 tmp
Any help would be appreciated.
Thanks, Wes.