add somes gmotools

This commit is contained in:
Gilles Mouchet 2024-06-29 16:13:22 +02:00
parent 74746016fc
commit 5f62d66005
4 changed files with 27 additions and 4 deletions

View File

@ -0,0 +1 @@
*/5 * * * * root /usr/local/bin/gmotools/update-hosts.sh > /dev/null 2>&1

View File

@ -29,7 +29,7 @@
name: role-postfix
- include_tasks: yum-check-update.yml
- include_tasks: update-hosts-file.yml
- name: import netdata role
import_role:
name: role-netdata

17
update-hosts-file.yml Normal file
View File

@ -0,0 +1,17 @@
---
- name: create destination folder
file:
path: /usr/local/bin/gmotools
state: directory
- name: copy script to folder
copy:
src: /tmp/hostsupd/update-hosts.sh
dest: /usr/local/bin/gmotools/update-hosts.sh
mode: 0750
remote_src: yes
- name: copy cron file
copy:
src: updhosts/update-hosts.cron
dest: /etc/cron.d/update-hosts.cron

View File

@ -1,12 +1,17 @@
---
- name: create destination folder
file:
path: /usr/local/bin/gmotools
state: directory
- name: get check-yum-update
copy:
src: /tmp/yumupd/check-yum-updates.sh
dest: /usr/local/bin/check-yum-updates.sh
dest: /usr/local/bin/gmotools/check-yum-updates.sh
mode: 0755
- name: create link crontab daily
file:
src: /usr/local/bin/check-yum-updates.sh
dest: /etc/cron.daily/check-yum-updates.sh
src: /usr/local/bin/gmotools/check-yum-updates.sh
dest: /etc/cron.daily/check-yum-updates
state: link