Upgrading to centos 6.6 has broken some ansible plays

72 views
Skip to first unread message

shadyb...@gmail.com

unread,
Dec 8, 2014, 12:19:49 PM12/8/14
to ansible...@googlegroups.com
Hi

I am running ansible 1.8.1. It was working fine on centos 6.5 but upgrading to centos 6.6 has broken it for certain use cases.

I am using jenkins to run an ansible playbook via shell. The play will start a PHP queue worker daemon on the remote servers. Since upgrading to centos 6.6, the worker starts but then terminates after a second. Through a process of elimination, I have determined that there is something with ansible that is causing this particular issue. Below is the play:

- hosts: staging
  gather_facts
: no
  tasks
:
   
- name: Run fresque
      shell
: 'sudo fresque start --config /etc/fresque/fresque.ini --queue {{ queue }} --autoloader {{ bootstrap }} --environment {{ app_env }} --interval {{ worker_interval }} --workers {{ num_workers }} --verbose --debug 1'
     
register: output


   
- debug: var=output.stdout_lines


and here is the strace output: http://pastebin.com/CfgsdCkH - Line 70 looks interesting. Google hasn't been very conducive; I can't see anything that'd cause this problem. I have also attempted to disable selinux to no avail.


Brian Coca

unread,
Dec 8, 2014, 12:32:01 PM12/8/14
to ansible...@googlegroups.com
Do not use sudo inside shell, this is not supported, we recommend
using ansible's sudo facility.

- name: Run fresque
shell: ...
sudo: true

If sudo is not set to NOPASSWORD you'll need to invoke ansible with
--ask-sudo-pass
--
Brian Coca

shadyb...@gmail.com

unread,
Dec 8, 2014, 12:52:48 PM12/8/14
to ansible...@googlegroups.com
Thanks brian.

I did what you suggested and I am getting "Missing sudo password" even though that particular command is set as NOPASSWD in /etc/sudoers.d/ for the particular user. Running the command manually via cli does not request a password. Thats why I used sudo directly in the shell module but that no longer works.

Brian Coca

unread,
Dec 8, 2014, 1:20:44 PM12/8/14
to ansible...@googlegroups.com

ah, sorry, Ansible Does Not SUPERAntiSpyware SD To Specific commands

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/acea1370-6c2d-44e2-9c1c-b389a6a00122%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

shadyb...@gmail.com

unread,
Dec 8, 2014, 1:42:17 PM12/8/14
to ansible...@googlegroups.com
Sorry, "SUPERAntiSpyware SD" ? What's that supposed to mean ?

Brian Coca

unread,
Dec 8, 2014, 2:21:03 PM12/8/14
to ansible...@googlegroups.com
bad autocorrect

"ah, sorry, Ansible Does Not support sudo to specific commands"
> https://groups.google.com/d/msgid/ansible-project/b53fe2a9-e64f-4547-92d4-668af68e04e0%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca
Reply all
Reply to author
Forward
0 new messages