Skip to content

Commit

Permalink
network: enable dispatcher scripts on CentOS
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt committed Aug 20, 2024
1 parent c0586b7 commit 14a62b9
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions roles/network/tasks/netplan-RedHat-family.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,33 @@
group: root
when: network_interfaces_path_stat.stat.isdir is defined and network_interfaces_path_stat.stat.isdir

# networkd-dispatcher is currently not being installed on CentOS
# - name: Copy dispatcher scripts
# become: true
# ansible.builtin.template:
# src: "{{ item.src }}"
# dest: "/etc/networkd-dispatcher/{{ item.dest }}"
# mode: 0755
# owner: root
# group: root
# loop: "{{ network_dispatcher_scripts }}"
- name: Create dispatcher directories
become: true
ansible.builtin.file:
path: "/etc/NetworkManager/dispatcher.d/{{ item.dest | ansible.builtin.dirname }}"
state: directory
mode: 0755
owner: root
group: root
loop: "{{ network_dispatcher_scripts }}"

# - name: "Manage service {{ network_dispatcher_service_name }}"
# become: true
# ansible.builtin.service:
# name: "{{ network_dispatcher_service_name }}"
# enabled: true
# state: started
# register: network_service
- name: Copy dispatcher scripts
become: true
ansible.builtin.template:
src: "{{ item.src }}"
dest: "/etc/NetworkManager/dispatcher.d/{{ item.dest }}"
mode: 0755
owner: root
group: root
loop: "{{ network_dispatcher_scripts }}"

- name: "Manage service {{ network_dispatcher_service_name }}"
become: true
ansible.builtin.service:
name: "{{ network_dispatcher_service_name }}"
enabled: true
state: started
register: network_service

- name: Include cleanup tasks
ansible.builtin.include_tasks: cleanup-netplan.yml
Expand Down

0 comments on commit 14a62b9

Please sign in to comment.