Rozdělení do skupin DSA a swconfig, úprava role network
This commit is contained in:
@@ -4,22 +4,22 @@
|
||||
when: network_globals is defined
|
||||
ansible.builtin.include_tasks: globals.yml
|
||||
|
||||
# Configure swconfig switch vlan section
|
||||
- name: Configure swconfig switch vlan section
|
||||
ansible.builtin.include_tasks: switch_swconfig.yml
|
||||
when: network_swconfig_switch_vlans is defined
|
||||
loop: "{{ network_swconfig_switch_vlans | default([]) }}"
|
||||
|
||||
# Configure dsa switch vlan section
|
||||
- name: Configure dsa switch vlan section
|
||||
ansible.builtin.include_tasks: switch_dsa.yml
|
||||
when: network_dsa_switch_vlans is defined
|
||||
loop: "{{ network_dsa_switch_vlans | default([]) }}"
|
||||
# Configure swconfig vlan section
|
||||
- name: Configure swconfig vlan section
|
||||
ansible.builtin.include_tasks: swconfig.yml
|
||||
when: network_swconfig is defined
|
||||
loop: "{{ network_swconfig | default([]) }}"
|
||||
|
||||
# Configure device section
|
||||
- name: Configure device section
|
||||
ansible.builtin.include_tasks: device.yml
|
||||
loop: "{{ network_devices | default([]) }}"
|
||||
loop: "{{ network_devices | default([]) + network_devices_append | default([]) }}"
|
||||
|
||||
# Configure dsa switch vlan section
|
||||
- name: Configure dsa switch vlan section
|
||||
ansible.builtin.include_tasks: vlan_filtering.yml
|
||||
when: network_bridge_vlan_filtering is defined
|
||||
loop: "{{ network_bridge_vlan_filtering | default([]) }}"
|
||||
|
||||
# Configure interface section
|
||||
- name: Configure interface section
|
||||
@@ -40,4 +40,16 @@
|
||||
- name: Apply changes and reload network
|
||||
uci:
|
||||
command: commit
|
||||
notify: Reload network
|
||||
|
||||
# Reload network service
|
||||
- name: Reload network
|
||||
nohup:
|
||||
command: /etc/init.d/network restart
|
||||
# Update device ip address
|
||||
- name: Update device ip address
|
||||
set_fact:
|
||||
ansible_host: "{{ device_ip_address }}"
|
||||
when: device_ip_address is defined
|
||||
- name: Wait target connection to become reachable/usable
|
||||
ansible.builtin.wait_for_connection:
|
||||
timeout: 30
|
||||
Reference in New Issue
Block a user