On 12/12/2013 11:52 AM, James Tanner wrote:
On 12/12/2013 11:47 AM, Steven Haddox wrote:
Due to the joys of Enterprise security, it appears that ansible is hanging (literally just sits until I Ctl+C like 10 minutes later) when trying to run any modules besides raw.

So for an example of a working command:

$ ansible all -i <path/to/hosts_file> -m raw -a "whoami; hostname" -u myself -s -U sudo_user -v

Yields lots of pretty green output with the hostname | success | rc=0 => etc. etc.

The following command module invocation though just hangs (with and without sudo_user being added):

$ ansible all -i <path/to/hosts_file> -m command -a "hostname" -u myself (-s -U sudo_user) -vvvv

With it in -vvvv verbose mode I'm able to see it connect to the server, sudo to the user properly and even upload the file, but then it just sits forever. So I decided to go take a look.

It appears that the module is indeed uploaded to the remote /tmp/ansible-<dynamic_stuff>/command location and has all the proper code, but the default permissions for newly created files on the server are setting it to 644 instead of 755. In turn the command is never able to be executed (best guess)?

Any ideas on how to fix this? Has anyone encountered this before? Is there a way to tell ansible to run chmod 755 on all modules it uploads somewhere perhaps? Or a hook where I could chmod 755 the entire /tmp/ansible-* directory recursively?

Thanks for any ideas / suggestions. Unfortunately I'm not able to control the default permissions on newly created files in my environment.

-Steven



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


What version of ansible?

Followup question: Is your user configured for passwordless sudo?

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to