Compare commits
2 commits
d5db7529dd
...
2b4a196e4d
Author | SHA1 | Date | |
---|---|---|---|
Timotej Lazar | 2b4a196e4d | ||
Timotej Lazar | 312cd8d4b3 |
|
@ -1,3 +1,19 @@
|
||||||
|
- name: Tell ifupdown to rename network interfaces
|
||||||
|
copy:
|
||||||
|
dest: /etc/network/if-pre-up.d/nameif
|
||||||
|
content: |
|
||||||
|
#!/bin/sh
|
||||||
|
nameif -s
|
||||||
|
mode: 0755
|
||||||
|
notify: restart networking
|
||||||
|
|
||||||
|
- name: Configure interface names
|
||||||
|
template:
|
||||||
|
dest: /etc/mactab
|
||||||
|
src: mactab.j2
|
||||||
|
mode: 0644
|
||||||
|
notify: restart networking
|
||||||
|
|
||||||
- name: Set up network interfaces
|
- name: Set up network interfaces
|
||||||
template:
|
template:
|
||||||
dest: /etc/network/interfaces
|
dest: /etc/network/interfaces
|
||||||
|
@ -88,3 +104,8 @@
|
||||||
dest: /etc/logrotate.d/unattended-upgrade
|
dest: /etc/logrotate.d/unattended-upgrade
|
||||||
src: unattended-upgrade.logrotate
|
src: unattended-upgrade.logrotate
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Configure MOTD
|
||||||
|
template:
|
||||||
|
dest: /etc/motd
|
||||||
|
src: motd.j2
|
||||||
|
|
3
roles/alpine/templates/mactab.j2
Normal file
3
roles/alpine/templates/mactab.j2
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{% for iface in interfaces | selectattr('mac_address') %}
|
||||||
|
{{ iface.name }} {{ iface.mac_address | lower }}
|
||||||
|
{% endfor %}
|
5
roles/alpine/templates/motd.j2
Normal file
5
roles/alpine/templates/motd.j2
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Welcome to {{ inventory_hostname }}.
|
||||||
|
|
||||||
|
Trespassers will be shot.
|
||||||
|
|
||||||
|
Survivors will be shot again.
|
Loading…
Reference in a new issue