Skip to content

Commit

Permalink
Merge "Don't fail veth-cleanup template when no container_networks"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Oct 14, 2016
2 parents e3ee9c5 + d829428 commit d2c7901
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/veth-cleanup.sh.j2
Expand Up @@ -6,8 +6,10 @@ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ip link del {{ inventory_hostname[-8:].replace('-', '').replace('_', '') }}_eth0 || true

# Veth cleanup for items in the container_networks data structure
{% if container_networks is defined %}
{% for key, value in container_networks.items() %}
{% if value.type is not defined or value.type == 'veth' %}
ip link del {{ inventory_hostname[-8:].replace('-', '').replace('_', '') }}_{{ value.interface }} || true
{% endif %}
{% endfor %}
{% endif %}

0 comments on commit d2c7901

Please sign in to comment.