first set new network config before installing ifupodown2
This commit is contained in:
parent
6a4870a9cc
commit
4597a9c65f
1 changed files with 29 additions and 29 deletions
|
@ -1,4 +1,33 @@
|
|||
---
|
||||
- name: Create interface config files
|
||||
ansible.builtin.template:
|
||||
src: "debian_interfaces.j2"
|
||||
dest: "/etc/network/interfaces"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '644'
|
||||
notify: Reload network interfaces debian
|
||||
when: ansible_facts["lsb"]["id"] == "Debian"
|
||||
|
||||
- name: Create dhcpcd config files
|
||||
ansible.builtin.template:
|
||||
src: "raspbian_dhcpcd.conf.j2"
|
||||
dest: "/etc/dhcpcd.conf"
|
||||
owner: root
|
||||
group: netdev
|
||||
mode: '664'
|
||||
notify: Restart dhcpcd raspbian
|
||||
when: ansible_facts["lsb"]["id"] == "Raspbian"
|
||||
|
||||
- name: Create netplan config files
|
||||
ansible.builtin.template:
|
||||
src: "ubuntu_00-installer-config.yaml.j2"
|
||||
dest: "/etc/netplan/00-installer-config.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '644'
|
||||
notify: Apply netplan ubuntu
|
||||
when: ansible_facts["lsb"]["id"] == "Ubuntu"
|
||||
|
||||
- name: Install ifupdown2
|
||||
apt:
|
||||
|
@ -31,32 +60,3 @@
|
|||
sysctl_set: true
|
||||
when: ipv6_forwarding
|
||||
|
||||
- name: Create interface config files
|
||||
ansible.builtin.template:
|
||||
src: "debian_interfaces.j2"
|
||||
dest: "/etc/network/interfaces"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '644'
|
||||
notify: Reload network interfaces debian
|
||||
when: ansible_facts["lsb"]["id"] == "Debian"
|
||||
|
||||
- name: Create dhcpcd config files
|
||||
ansible.builtin.template:
|
||||
src: "raspbian_dhcpcd.conf.j2"
|
||||
dest: "/etc/dhcpcd.conf"
|
||||
owner: root
|
||||
group: netdev
|
||||
mode: '664'
|
||||
notify: Restart dhcpcd raspbian
|
||||
when: ansible_facts["lsb"]["id"] == "Raspbian"
|
||||
|
||||
- name: Create netplan config files
|
||||
ansible.builtin.template:
|
||||
src: "ubuntu_00-installer-config.yaml.j2"
|
||||
dest: "/etc/netplan/00-installer-config.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '644'
|
||||
notify: Apply netplan ubuntu
|
||||
when: ansible_facts["lsb"]["id"] == "Ubuntu"
|
||||
|
|
Loading…
Reference in a new issue