Skip to content

Instantly share code, notes, and snippets.

@martinstreicher
Created May 20, 2014 16:20
Show Gist options
  • Save martinstreicher/93a80346851e643e652a to your computer and use it in GitHub Desktop.
Save martinstreicher/93a80346851e643e652a to your computer and use it in GitHub Desktop.
Odd result from Ansible.
When I do this…
- name: capture the remote user's home directory
sudo: False
shell: pwd
register: home_dir
Why does home_dir show me this…
TASK: [application | debug msg="Home directory is {{home_dir}}"] **************
ok: [sidekiq_stage_east] => {
"item": "",
"msg": "Home directory is {u'changed': True, u'end': u'2014-05-20 13:48:28.011620', u'stdout': u'/home/ubuntu', u'cmd': u'pwd ', 'item': '', u'delta': u'0:00:00.001250', u'stderr': u'', u'rc': 0, 'invocation': {'module_name': 'shell', 'module_args': 'pwd'}, 'stdout_lines': [u'/home/ubuntu'], u'start': u'2014-05-20 13:48:28.010370’”}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment