Upgrading to centos 6.6 has broken some ansible plays

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.

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

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.

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

Sorry, “SUPERAntiSpyware SD” ? What’s that supposed to mean ?

bad autocorrect

"ah, sorry, Ansible Does Not support sudo to specific commands"