-
Notifications
You must be signed in to change notification settings - Fork 61
/
main.yml
36 lines (33 loc) · 1.21 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- name: network all interfaces changed
service:
name: "{{ network_service }}"
state: restarted
when: network_allow_service_restart
register: network_service_restart_result
- name: network restart interface service
# schema: network_configuration_result.results
# = [ { "item": [ <device>, [<config>, ...] ], ... }, ... ]
service:
name: "{{ network_service }}"
state: restarted
arguments: "INTERFACE={{ item.item.0 }}"
when: >
(network_service_restart_result is undefined or not network_service_restart_result.changed)
and ('service' == network_restart_method)
and item.changed
and item.item.1.0.auto | default(true)
with_items: "{{ network_configuration_result.results | default([]) }}"
tags:
- skip_ansible_lint
- name: network restart interface command
shell: >
{{ network_interface_restart_commands[ network_restart_method ] }}
when: >
(network_service_restart_result is undefined or not network_service_restart_result.changed)
and (network_restart_method in network_interface_restart_commands)
and item.changed
and item.item.1.0.auto | default(true)
with_items: "{{ network_configuration_result.results | default([]) }}"
tags:
- skip_ansible_lint