You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
7 years ago
|
- name: Disable Systemctl-Network
|
||
|
service:
|
||
|
name: systemd-networkd.service
|
||
|
enabled: no
|
||
|
state: stopped
|
||
|
|
||
|
- name: Hetzner network config
|
||
|
template: src=99-hetzner.conf.j2 dest=/etc/sysctl.d/99-hetzner.conf owner=root group=root mode=0644
|
||
|
|
||
|
- name: Setup udev rules for eth0
|
||
|
template: src=80-net-setup-link.rules.j2 dest=/etc/udev/rules.d/80-net-setup-link.rules
|
||
|
|
||
|
- name: Setup eth0 Network
|
||
|
template: src=eth0.j2 dest=/etc/netctl/eth0 owner=root group=root mode=0644
|
||
|
|
||
|
- name: start eth0 profile
|
||
|
command: netctl start eth0
|
||
|
|
||
|
- name: enable eth0 profile
|
||
|
command: netctl enable eth0
|
||
|
register: "enable_result"
|
||
|
changed_when:
|
||
|
- enable_result is success
|
||
|
- "('already' not in enable_result.stderr and 'ln' in enable_result.stdout)"
|
||
|
|
||
|
- name: Setup lxc br0 Network
|
||
|
template: src=br0.j2 dest=/etc/netctl/br0 owner=root group=root mode=0644
|
||
|
when: lxc_ipv4_address is defined
|
||
|
|
||
|
- name: start br0 network
|
||
|
command: netctl start br0
|
||
|
|
||
|
- name: enable br0 profile
|
||
|
command: netctl enable br0
|
||
|
register: "enable_result"
|
||
|
changed_when:
|
||
|
- enable_result is success
|
||
|
- "('already' not in enable_result.stderr and 'ln' in enable_result.stdout)"
|
||
|
when: lxc_ipv4_address is defined
|