Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bacad7f

Browse files
committedAug 20, 2024·
network: enable dispatcher scripts on CentOS
Signed-off-by: Christian Berendt <berendt@osism.tech>
1 parent c0586b7 commit bacad7f

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed
 

‎roles/network/tasks/netplan-RedHat-family.yml

+25-17
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,32 @@
6868
group: root
6969
when: network_interfaces_path_stat.stat.isdir is defined and network_interfaces_path_stat.stat.isdir
7070

71-
# networkd-dispatcher is currently not being installed on CentOS
72-
# - name: Copy dispatcher scripts
73-
# become: true
74-
# ansible.builtin.template:
75-
# src: "{{ item.src }}"
76-
# dest: "/etc/networkd-dispatcher/{{ item.dest }}"
77-
# mode: 0755
78-
# owner: root
79-
# group: root
80-
# loop: "{{ network_dispatcher_scripts }}"
71+
- name: Create dispatcher directories
72+
become: true
73+
ansible.builtin.file:
74+
path: "/etc/NetworkManager/dispatcher.d/{{ item.dest | ansible.builtin.dirname }}"
75+
mode: 0755
76+
owner: root
77+
group: root
78+
loop: "{{ network_dispatcher_scripts }}"
79+
80+
- name: Copy dispatcher scripts
81+
become: true
82+
ansible.builtin.template:
83+
src: "{{ item.src }}"
84+
dest: "/etc/NetworkManager/dispatcher.d/{{ item.dest }}"
85+
mode: 0755
86+
owner: root
87+
group: root
88+
loop: "{{ network_dispatcher_scripts }}"
8189

82-
# - name: "Manage service {{ network_dispatcher_service_name }}"
83-
# become: true
84-
# ansible.builtin.service:
85-
# name: "{{ network_dispatcher_service_name }}"
86-
# enabled: true
87-
# state: started
88-
# register: network_service
90+
- name: "Manage service {{ network_dispatcher_service_name }}"
91+
become: true
92+
ansible.builtin.service:
93+
name: "{{ network_dispatcher_service_name }}"
94+
enabled: true
95+
state: started
96+
register: network_service
8997

9098
- name: Include cleanup tasks
9199
ansible.builtin.include_tasks: cleanup-netplan.yml

0 commit comments

Comments
 (0)
Please sign in to comment.