Add new osbuildapi-update-nft.cron entries, and get it installed when nftables.
Signed-off-by: James Antill <james@and.org>
This commit is contained in:
parent
4fac049b6a
commit
1c6c65844d
2 changed files with 21 additions and 0 deletions
|
@ -382,12 +382,28 @@
|
|||
|
||||
- name: Install script to update osbuild api ip in the firewall
|
||||
ansible.builtin.template: src=osbuildapi-update.sh dest=/usr/local/bin/osbuildapi-update.sh mode=755
|
||||
when: not nftables
|
||||
tags:
|
||||
- koji_builder
|
||||
- koji_builder/osbuildapi
|
||||
|
||||
- name: Install cron job to run osbuild api ip update script every minute.
|
||||
ansible.builtin.template: src=osbuildapi-update.cron dest=/etc/cron.d/osbuildapi-update.cron mode=644
|
||||
when: not nftables
|
||||
tags:
|
||||
- koji_builder
|
||||
- koji_builder/osbuildapi
|
||||
|
||||
- name: Install script to update osbuild api ip in the firewall (nftables)
|
||||
ansible.builtin.template: src=osbuildapi-update-nft.sh dest=/usr/local/bin/osbuildapi-update-nft.sh mode=755
|
||||
when: nftables
|
||||
tags:
|
||||
- koji_builder
|
||||
- koji_builder/osbuildapi
|
||||
|
||||
- name: Install cron job to run osbuild api ip update script every minute. (nftables)
|
||||
ansible.builtin.template: src=osbuildapi-update-nft.cron dest=/etc/cron.d/osbuildapi-update-nft.cron mode=644
|
||||
when: nftables
|
||||
tags:
|
||||
- koji_builder
|
||||
- koji_builder/osbuildapi
|
||||
|
|
5
roles/koji_builder/templates/osbuildapi-update-nft.cron
Normal file
5
roles/koji_builder/templates/osbuildapi-update-nft.cron
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% if host in groups['osbuild'] %}
|
||||
*/5 * * * * root /usr/local/bin/lock-wrapper osbuildapi "/usr/local/bin/osbuildapi-update-nft.sh" 2>&1 | /usr/local/bin/nag-once osbuildapi-update-nft.sh 1d 2>&1
|
||||
{% else %}
|
||||
23 17 * * * root /usr/local/bin/lock-wrapper osbuildapi "/usr/local/bin/osbuildapi-update-nft.sh" 2>&1 | /usr/local/bin/nag-once osbuildapi-update-nft.sh 1d 2>&1
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue