error with home dir

hello

I am getting an error about a homedir, but it isnt the right homedir. It looks like ansible hard codes /home/$USER or something, here is the error , any ideas? The real home dir of this user is /home/d/dpadmin but for some reason it is trying to create /home/dpadmin which is failing the playbook

File “/tmp/ansible.0O3Er9/setup”, line 59, in

os.makedirs(ansible_dir)

File “/usr/lib64/python2.6/os.py”, line 150, in makedirs

makedirs(head, mode)

File “/usr/lib64/python2.6/os.py”, line 157, in makedirs

mkdir(name, mode)

OSError: [Errno 13] Permission denied: ‘/home/dpadmin’

$ finger dpadmin
Login: dpadmin
Directory: /home/d/dpadmin Shell: /bin/bash

Thanks
-AD

Which version of Ansible are you using?

This should be long resolved to use $HOME at least on the devel branch.

It's pretty safe if you want to switch to it.

--Michael

ansible.noarch 0.3.1-1.el6 epel

Ok, this is fixed in devel. I’m not going to back port the fix because it’s not long before 0.4 will be out.

You may wish to try the devel branch.

I tried with the latest from git and I am getting

=> failed to transfer file to /setup

Traceback (most recent call last):
File “/usr/local/src/ansible/lib/ansible/connection.py”, line 163, in put_file
sftp.put(in_path, out_path)
File “/usr/lib/python2.6/site-packages/paramiko/sftp_client.py”, line 557, in put
fr = self.file(remotepath, ‘wb’)
File “/usr/lib/python2.6/site-packages/paramiko/sftp_client.py”, line 245, in open
t, msg = self._request(CMD_OPEN, filename, imode, attrblock)
File “/usr/lib/python2.6/site-packages/paramiko/sftp_client.py”, line 624, in _request
return self._read_response(num)
File “/usr/lib/python2.6/site-packages/paramiko/sftp_client.py”, line 671, in _read_response
self._convert_status(msg)
File “/usr/lib/python2.6/site-packages/paramiko/sftp_client.py”, line 699, in _convert_status
raise IOError(errno.EACCES, text)
IOError: [Errno 13] Permission denied

I am only running 1 basic task, to see if apache is running

tasks:

  • name: ensure apache is running
    action: service name=httpd state=started
    handlers:
  • name: restart apache
    action: service name=apache state=restarted

devel branch works, thanks.