Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Module in 0.9: Fails if called on xen host as non-root user #1854

Closed
dusko opened this issue Jan 10, 2013 · 0 comments
Closed

Setup Module in 0.9: Fails if called on xen host as non-root user #1854

dusko opened this issue Jan 10, 2013 · 0 comments

Comments

@dusko
Copy link

dusko commented Jan 10, 2013

Ansible version: 0.9
Module name: setup
OS: Linux Centos 6.3 x86_64

After upgrade from version 0.8 to 0.9 I'm not able to gather facts about target XEN virtualized hosts when accessing hosts as non-root user with ssh.
Issue is that setup module for XEN virtualized hosts is accessing file /proc/xen/capabilities which is readable only for root (at least on all my xen hosts) and always fails on permission denied.

I think that issue comes with this commit: 29882f97e6d3384dd943619c732d40eb7d0dd539

Here is an example:

$ ansible test -v -m setup
.....
test | FAILED => failed to parse: Traceback (most recent call last):

  File "/home/dusko/.ansible/tmp/ansible-1357812349.12-181204905598058/setup", line 1587, in ?

    main()

  File "/home/dusko/.ansible/tmp/ansible-1357812349.12-181204905598058/setup", line 940, in main

    data = run_setup(module)

  File "/home/dusko/.ansible/tmp/ansible-1357812349.12-181204905598058/setup", line 887, in run_setup

    facts = ansible_facts()

  File "/home/dusko/.ansible/tmp/ansible-1357812349.12-181204905598058/setup", line 879, in ansible_facts

    facts.update(Virtual().populate())

  File "/home/dusko/.ansible/tmp/ansible-1357812349.12-181204905598058/setup", line 708, in populate

    self.get_virtual_facts()

  File "/home/dusko/.ansible/tmp/ansible-1357812349.12-181204905598058/setup", line 717, in get_virtual_facts

    for line in open('/proc/xen/capabilities'):

IOError: [Errno 13] Permission denied: '/proc/xen/capabilities'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants