# ansible and suexec

**URL:** <https://forum.ansible.com/t/ansible-and-suexec/13905>\
**Category:** Ansible Project\
**Created:** [November 14, 2013, 12:49pm UTC](https://forum.ansible.com/t/ansible-and-suexec/13905 "2013-11-14T12:49:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lennardcornelis](https://avatars.discourse-cdn.com/v4/letter/l/a183cd/32.png) [@lennardcornelis](https://forum.ansible.com/u/lennardcornelis)\
**Post date:** [November 14, 2013, 12:49pm UTC](https://forum.ansible.com/t/ansible-and-suexec/13905/1 "2013-11-14T12:49:09Z")

</div>

Hello,

I’m trying to run an Ansible-playbook with a sudo to root. But because of security we are using suexec and not sudo and with suexec it is possible to change from my key to root without password. … i just wonder if this possible with ansible:

ansible-playbook testroot.yml --ask-pass gives now following error:

SSH password:

PLAY [hostname] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

GATHERING FACTS \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

fatal: [[hostname.test.net](http://hostname.test.net)] =\> {‘msg’: “FAILED: Bad authentication type (allowed\_types=[‘keyboard-interactive’])”, ‘failed’: True}

TASK: [list] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

FATAL: no hosts matched or all hosts have already failed – aborting

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

any help is welcome … Thanks

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 15, 2013, 5:34pm UTC](https://forum.ansible.com/t/ansible-and-suexec/13905/2 "2013-11-15T17:34:23Z")

</div>

You can swap out what sudo is used in ansible.cfg

– Michael
