I want to create a playbook to create but also delete databases that are not anymore in my configuration file.
Lets take an example, I have a variable listing database to create :
db:
- foo
- bar
First run DB foo and bar are created, if I remove bar from my list, when I run ansible bar is always in my server.
I would find a solution to address the deletion of a previously added db but not available anymore.
Somewhere something like this playbook (for users) : https://github.com/jurgenhaas/ansible-user-management
Any idea to deal with this problem ?
How do you deal with resources added then removed to delete them on server ?
Create a temporary playbook to explicitly remove the resources ?