1.0.0 Release IaaS
This commit is contained in:
23
ansible/roles/common/tasks/node/set_networkd.yaml
Normal file
23
ansible/roles/common/tasks/node/set_networkd.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: Set network files directory
|
||||
ansible.builtin.set_fact:
|
||||
directory_name: "{{ node['name'] }}"
|
||||
when: node['name'] in ["vmm", "fw"]
|
||||
|
||||
- name: Set target vm
|
||||
ansible.builtin.set_fact:
|
||||
target_vm: "{{ node['name'] }}"
|
||||
|
||||
- name: Deploy networkd files
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/systemd/network/{{ item | basename }}"
|
||||
owner: "root"
|
||||
group: "systemd-network"
|
||||
mode: "0640"
|
||||
loop: "{{ query('fileglob', hostvars['console']['node']['config_path'] + '/node/' + (directory_name | default('common')) + '/networkd/*') | sort }}"
|
||||
become: true
|
||||
notify:
|
||||
- "notification_reload_networkctl"
|
||||
- "notification_restart_crowdsec"
|
||||
no_log: true
|
||||
Reference in New Issue
Block a user