error with home dir

161 views
Skip to first unread message

AD

unread,
May 9, 2012, 11:09:58 PM5/9/12
to ansible...@googlegroups.com
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 <module>

    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

Michael DeHaan

unread,
May 9, 2012, 11:11:28 PM5/9/12
to ansible...@googlegroups.com
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

AD

unread,
May 10, 2012, 9:10:43 AM5/10/12
to ansible...@googlegroups.com
ansible.noarch                             0.3.1-1.el6                   epel  

Michael DeHaan

unread,
May 10, 2012, 9:13:10 AM5/10/12
to ansible...@googlegroups.com
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.

AD

unread,
May 10, 2012, 9:15:25 AM5/10/12
to ansible...@googlegroups.com
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

AD

unread,
May 10, 2012, 9:37:35 AM5/10/12
to ansible...@googlegroups.com
devel branch works, thanks.
Reply all
Reply to author
Forward
0 new messages