Role service-fastd-mesh: add systemd timer for fastd peer limit update script
This commit is contained in:
parent
7e181923b3
commit
829d931ff9
3 changed files with 45 additions and 2 deletions
|
@ -98,8 +98,29 @@
|
|||
mode: 0644
|
||||
notify: reload systemd
|
||||
|
||||
- name: configure systemd unit/timer fastd-sync-meshkeys
|
||||
- name: write systemd unit fastd-peer-limit-update.service
|
||||
template:
|
||||
src: fastd-peer-limit-update.service.j2
|
||||
dest: /etc/systemd/system/fastd-peer-limit-update.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: reload systemd
|
||||
|
||||
- name: write systemd timer fastd-peer-limit-update.timer
|
||||
template:
|
||||
src: fastd-peer-limit-update.timer.j2
|
||||
dest: /etc/systemd/system/fastd-peer-limit-update.timer
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: reload systemd
|
||||
|
||||
- name: configure systemd timers for fastd-mesh instance
|
||||
systemd:
|
||||
name: fastd-sync-meshkeys.timer
|
||||
name: "{{ item }}.timer"
|
||||
enabled: yes
|
||||
state: started
|
||||
with_items:
|
||||
- fastd-sync-meshkeys
|
||||
- fastd-peer-limit-update
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#
|
||||
# {{ ansible_managed }}
|
||||
#
|
||||
[Unit]
|
||||
Description=Update fastd peer limits
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/admin/clones/backend-scripts/limit_fastd_peers_gw.py
|
||||
User=admin
|
||||
Group=admin
|
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# {{ ansible_managed }}
|
||||
#
|
||||
[Unit]
|
||||
Description=Timer which schedules fastd-peer-limit-update.service
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
OnUnitActiveSec=5min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Reference in a new issue