Common: Network setup

This commit is contained in:
Tobias Manske 2023-09-12 03:27:12 +02:00
parent f746583d52
commit 550a50326a
Signed by: tobias
GPG Key ID: 9164B527694A0709
2 changed files with 38 additions and 0 deletions

View File

@ -48,6 +48,25 @@
state: absent
path: /etc/ssh/ssh_config.d/40-ssh-key-dir.conf
- name: Setup Networks
hosts: network_config
become: true
become_user: root
tasks:
- name: Setup wired interface
ansible.builtin.template:
src: "connection.nmconnection.j2"
dest: "/etc/NetworkManager/system-connections/Wired Connection 1.nmconnection"
owner: root
group: root
mode: '0600'
notify: Reload Network
handlers:
- name: Reload Network
ansible.builtin.systemd:
name: NetworkManager.service
state: restarted
- name: Backup
hosts: backup

View File

@ -0,0 +1,19 @@
[connection]
id=Wired connection 1
uuid=18c78ff6-605e-33c6-89b3-24bb1630d2b2
type=ethernet
autoconnect-priority=-999
interface-name={{ network_interface | mandatory }}
timestamp=1693314040
[ethernet]
[ipv4]
ignore-auto-dns=true
method=auto
[ipv6]
addr-gen-mode=default
address1={{ network_ipv6_addr | mandatory }}/64,fe80::1
ignore-auto-dns=true
method=manual