Add timer & service to reconfigure net interface due to buggy driver
This commit is contained in:
parent
83ad3362bd
commit
9b5e3eca08
3 changed files with 45 additions and 0 deletions
|
|
@ -39,6 +39,31 @@
|
|||
dest: '/etc/systemd/network/wg0.network',
|
||||
}
|
||||
|
||||
- name: copy interface restart timer/service
|
||||
become: true
|
||||
template:
|
||||
src: '{{ item.src }}'
|
||||
dest: '{{ item.dest }}'
|
||||
owner: root
|
||||
group: systemd-network
|
||||
mode: '0640'
|
||||
loop:
|
||||
- {
|
||||
src: 'templates/interface_restart.timer.j2',
|
||||
dest: '/etc/systemd/system/interface-restart.timer',
|
||||
}
|
||||
- {
|
||||
src: 'templates/interface_restart.service.j2',
|
||||
dest: '/etc/systemd/system/interface-restart.service',
|
||||
}
|
||||
|
||||
- name: enable interface restart timer
|
||||
become: true
|
||||
systemd:
|
||||
name: interface-restart.timer
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: copy mobile configuration
|
||||
template:
|
||||
src: 'mobile.wireguard.j2'
|
||||
|
|
|
|||
9
templates/interface_restart.service.j2
Normal file
9
templates/interface_restart.service.j2
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Service which reconfigures the `link1` interface as a temporary workaround for the buggy r8169 driver
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/networkctl reconfigure link1
|
||||
Type=oneshot
|
||||
11
templates/interface_restart.timer.j2
Normal file
11
templates/interface_restart.timer.j2
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Hourly service which reconfigures the `link1` network interface
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue