ansible caches playbook

38 views
Skip to first unread message

Ilia Ternovich

unread,
Dec 16, 2016, 10:49:36 AM12/16/16
to Ansible Project
Hi,

I'm using vagrant + ansible for proof of concept of IoT solution.

I have successfully executed ansible playbook and destroyed virtual machine (e.g. vagrant destroy 'slave'). But when I recreate 'slave' ansible doesn't execute my playbook but instead caches results of the previous execution. Is this an expected behavior or I'm doing something wrong?

Thanks

Brian Coca

unread,
Dec 16, 2016, 10:52:54 AM12/16/16
to ansible...@googlegroups.com
There is no playbook cache in Ansible.


----------
Brian Coca

Ilia Ternovich

unread,
Dec 19, 2016, 12:38:51 AM12/19/16
to Ansible Project
Hi Brian,

Let me clarify my problem in more details. I have installed geerlingguy.mysql ansible role on my master virtual box. Then I run this role via ansible-playbook. It takes around 3-5 minutes to install packages and configure everything on slave and then there is error with (TASK [geerlingguy.mysql : Disallow root login remotely])

I fix this error, destroy slave virtual box and rerun ansible. Instead of clean installation of mysql (e.g. rerunning playbook from scratch) it skips all steps and shows me previous error. It should somehow remembered previous execution of playbook independent on slave state. How can I fix it?

Thanks

Brian Coca

unread,
Dec 19, 2016, 9:16:00 PM12/19/16
to ansible...@googlegroups.com
Ansible does not keep data/state, it relies on the state of the target machine.


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