Merge branch 'master' of ssh://source.hawkless.id.au:222/coryHawkvelt/ansible-network-config into HEAD
This commit is contained in:
commit
454f0d4655
|
@ -21,22 +21,37 @@
|
|||
state: absent
|
||||
tags: interfaces
|
||||
|
||||
- name: Remove /etc/netplan/01-netcfg.yaml
|
||||
file:
|
||||
path: /etc/netplan/01-netcfg.yaml
|
||||
state: absent
|
||||
# - name: Get directory stats
|
||||
# stat:
|
||||
# path: "/etc/netplan"
|
||||
# register: directory_stat
|
||||
|
||||
# - name: Delete directory
|
||||
# file:
|
||||
# path: "/etc/netplan"
|
||||
# state: absent
|
||||
|
||||
# - name: Create directory
|
||||
# file:
|
||||
# path: "/etc/netplan"
|
||||
# state: directory
|
||||
# owner: "{{ directory_stat.stat.pw_name }}"
|
||||
# group: "{{ directory_stat.stat.gr_name }}"
|
||||
# mode: "{{ directory_stat.stat.mode }}"
|
||||
- name: 'Collect files in netplan dir'
|
||||
find:
|
||||
paths: "/etc/netplan/"
|
||||
hidden: True
|
||||
recurse: True
|
||||
# file_type: any # Added in ansible 2.3
|
||||
register: collected_files
|
||||
tags: interfaces
|
||||
|
||||
- name: Remove /etc/netplan/50-cloud-init.yaml
|
||||
- name: Remove collected files
|
||||
file:
|
||||
path: /etc/netplan/50-cloud-init.yaml
|
||||
state: absent
|
||||
tags: interfaces
|
||||
|
||||
- name: Remove /etc/netplan/00-installer-config.yaml
|
||||
file:
|
||||
path: /etc/netplan/00-installer-config.yaml
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
with_items: "{{ collected_files.files }}"
|
||||
tags: interfaces
|
||||
|
||||
- name: Add the bonding module
|
||||
|
|
|
@ -95,7 +95,11 @@ auto {{ item['name'] }}
|
|||
{% if item['mtu'] is defined %}
|
||||
mtu {{ item['mtu'] }}
|
||||
{% endif %}
|
||||
{% if item['bond-mode'] is defined %}
|
||||
bond-mode {{ item['bond-mode'] }}
|
||||
{% else %}
|
||||
bond-mode active-backup
|
||||
{% endif %}
|
||||
bond-miimon 100
|
||||
bond-slaves none
|
||||
{% if item['routes'] is defined %}
|
||||
|
|
Loading…
Reference in New Issue