Hi,
I hope someone here could shed some light on this. Below is a super simplified example using EC2 elements but this could happen with other elements obviously.
`
master_state: present
Create Subnet
state: {{ master_state }}
Create RoutingTable
state: {{ master_state }}
`
So this is fine, now we switch master_state to absent and script fails because RoutingTable needs to be erased first. (unless i get this script run in total reverse) is there a way to do this somehow? If I use Conditionals in combination with wait_for I could probably rely on order of tasks in file when state=present (normal) and when state=absent add to Subnet wait_for RoutingTable.id = null before trying to delete subnet.
Am I overcomplicating this? Is there an easy way to do this?
Peter.