Cleanup network namespaces (vxlans)

This commit is contained in:
Egon Rijpkema 2018-07-19 13:19:25 +02:00
parent 3369b5d9d9
commit e9c62529ad

View File

@ -2,7 +2,7 @@
# This playbook will reset the instalation to facilitate a new installation. # This playbook will reset the instalation to facilitate a new installation.
# All data is lost! # All data is lost!
- hosts: all - hosts: all
become: True become: true
name: Dummy to gather facts name: Dummy to gather facts
tasks: tasks:
- name: Stop docker service - name: Stop docker service
@ -13,11 +13,14 @@
state: stopped state: stopped
- name: remove volumes - name: remove volumes
shell: "rm -rf /srv" shell: "rm -rf /srv"
- name: remove network namespaces
shell: "rm /var/run/netns/*"
ignore_errors: true
- hosts: nova-compute - hosts: nova-compute
gather_facts: false gather_facts: false
become: True become: true
tasks: tasks:
- name: kill all vm's - name: kill all vm's
shell: "for machine in $(virsh list --uuid ); do virsh destroy $machine ; done" shell: "for machine in $(virsh list --uuid ); do virsh destroy $machine ; done"