Overhaul reuse structure from role to task orientation
The overall config this will end up with is going to be nowhere near complicated enough to require the segmented structure of roles. A single directory of reusable tasks and resources will be much better
This commit is contained in:
24
tasks/networkd/configure.yml
Normal file
24
tasks/networkd/configure.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Configure networking via systemd
|
||||
become: true
|
||||
when: omni_networking is defined
|
||||
block:
|
||||
- name: Create the networkd config directory
|
||||
file:
|
||||
path: /etc/systemd/network
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: Make network files
|
||||
template:
|
||||
src: networkd/network.j2
|
||||
dest: "/etc/systemd/network/{{ item.key }}.network"
|
||||
mode: 0644
|
||||
loop: "{{ omni_networking | dict2items }}"
|
||||
|
||||
- name: Make netdev files
|
||||
template:
|
||||
src: networkd/netdev.j2
|
||||
dest: "/etc/systemd/network/{{ item.0.key + '.' + item.1 }}.netdev"
|
||||
mode: 0644
|
||||
loop: "{{ omni_networking | dict2items | subelements('value.vlans', true) }}"
|
||||
Reference in New Issue
Block a user