Now configuring magic-router as well

This commit is contained in:
2021-11-12 00:36:16 +01:00
parent a306d9e56c
commit 35590f4e59
6 changed files with 70 additions and 7 deletions

View File

@ -6,6 +6,7 @@
- name: "Install my favourite applications"
apt:
update_cache: true
state: present
name:
- tmux

View File

@ -0,0 +1,6 @@
- name: enable routing in sysctl config
ansible.posix.sysctl:
name: net.ipv4.ip_forward
value: 1
state: present
reload: true

View File

@ -7,4 +7,12 @@
template:
src: templates/netplan.yaml
dest: /etc/netplan/00-static.yaml
notify: netplanapply
notify: netplanapply
when: ansible_host != "magic-router"
- name: "install static config for magic router"
copy:
src: files/magic_router_netplan.yaml
dest: /etc/netplan/00-static.yaml
notify: netplanapply
when: ansible_host == "magic-router"