Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network: enable dispatcher scripts on CentOS #699

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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