# How do you run unattended ansible?

**URL:** <https://forum.ansible.com/t/how-do-you-run-unattended-ansible/12125>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [December 6, 2012, 7:38pm UTC](https://forum.ansible.com/t/how-do-you-run-unattended-ansible/12125 "2012-12-06T19:38:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [December 6, 2012, 7:38pm UTC](https://forum.ansible.com/t/how-do-you-run-unattended-ansible/12125/1 "2012-12-06T19:38:15Z")

</div>

for certain tasks i have a ‘maint’ user that has a sshkey w/o passphrase, run ansible from the cron with the config options using that key for that user (he also has sudo NOPASSWORD to a restricted set of commands).

I haven’t used it, but there is also fireball mode.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [December 7, 2012, 4:11pm UTC](https://forum.ansible.com/t/how-do-you-run-unattended-ansible/12125/2 "2012-12-07T16:11:56Z")

</div>

> for certain tasks i have a 'maint' user that has a sshkey w/o passphrase,  
> run ansible from the cron with the config options using that key for that  
> user (he also has sudo NOPASSWORD to a restricted set of commands).
> 
> I haven't used it, but there is also fireball mode.

Fireball mode doesn't help you with the intended case at all because  
it distributes secrets over SSH.

Dylan's previous 2 answers are what is there now. I'd like to see  
more done in the docs explaining how to do the ssh-agent /  
SSH-AUTH-SOCK thing if someone wants to write a paragraph or two, I'll  
figure out where to insert it.

---

<div class="post-metadata">

**Author:** ![Dylan\_Martin](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@Dylan\_Martin](https://forum.ansible.com/u/Dylan_Martin)\
**Post date:** [December 7, 2012, 6:48pm UTC](https://forum.ansible.com/t/how-do-you-run-unattended-ansible/12125/3 "2012-12-07T18:48:52Z")

</div>

Okay, here’s a stab at it:
