ansible caches playbook

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

There is no playbook cache in Ansible.

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

Ansible does not keep data/state, it relies on the state of the target machine.