Skip to content

Commit 4037c42

Browse files
Merge pull request #865 from rabi/cleanup
Add ansible var to cleanup non configured interfaces
2 parents 951beb8 + 788c647 commit 4037c42

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

roles/edpm_network_config/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ edpm_network_config_safe_defaults: true
5454
edpm_network_config_template: ""
5555
edpm_bond_interface_ovs_options: "bond_mode=active-backup"
5656
edpm_dns_search_domains: []
57+
edpm_network_config_nonconfigured_cleanup: false

roles/edpm_network_config/meta/argument_specs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,7 @@ argument_specs:
7979
type: str
8080
description: "Name of the public network interface"
8181
default: nic1
82+
edpm_network_config_nonconfigured_cleanup:
83+
type: bool
84+
description: "Cleanup network interfaces not in network config"
85+
default: false

roles/edpm_network_config/tasks/os_net_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
msg: "{{ os_net_config_config['content'] | b64decode | trim }}"
4343
- name: Run edpm_os_net_config_module with network_config
4444
edpm_os_net_config:
45+
cleanup: "{{ edpm_network_config_nonconfigured_cleanup }}"
4546
config_file: "{{ nic_config_file }}"
4647
debug: "{{ edpm_network_config_debug | bool }}"
4748
detailed_exit_codes: true

0 commit comments

Comments
 (0)