I have an ansible playbook that creates a network object and sets ACL policies. It's working well, but I would like to create the complementary playbook to remove the object and its associated config but I don't know the correct way to approach the task.
I could just use asa_command
to issue the 'no' prefix for the appropriate lines, however, that doesn't feel like the "Ansible Way" since it would try to execute the commands even if they were already absent in the config.
I have seen that some modules have a state: absent
operator. However, the asa_
modules don't indicate that as an option.
Any suggestions would be much appreciated.
I think having a state: absent
option makes a lot of sense, as I don't think there is a simple way of doing this more efficiently with the current asa_
modules. The Ansible team is extremely responsive to issues and PRs, so I would submit one for this feature.