Hi,
I've just started using ansible and I wanted to delete the "default"
network created in my KVM install. I'm using the following syntax:
- name: destroy default network
virt_net: command=destroy name=default
ignore_errors: true
- name: undefine default network
virt_net: command=undefine name=default
ignore_errors: true
This works fine, but I had to put in the "ignore_errors: true" flag because
if i run this playbook more than once, the second time it will error out as
the "default" network does not exist. On most other ansible tasks, for
example when creating a linux user account, ansible will skip over it if
the user account already exists and does not error out in the middle of the
playbook.
Is there a way to do the same for my destroy and undefine commands in
virt_net? I'm not sure if what i'm doing is the cleanest method. I know
in a perfect world, i would not be running this playbook more than once,
but I am running it multiple times testing different additions to the
playbook.
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/52124716-192b-4f78-a88d-9b563aac9321%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.