Role service-fastd-mesh: add systemd timer for fastd peer limit update script

This commit is contained in:
Tobias Hachmer 2017-10-06 11:47:09 +02:00
parent 7e181923b3
commit 829d931ff9
3 changed files with 45 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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