add somes gmotools
This commit is contained in:
parent
74746016fc
commit
5f62d66005
1
files/updhosts/update-hosts.cron
Normal file
1
files/updhosts/update-hosts.cron
Normal file
@ -0,0 +1 @@
|
|||||||
|
*/5 * * * * root /usr/local/bin/gmotools/update-hosts.sh > /dev/null 2>&1
|
||||||
2
main.yml
2
main.yml
@ -29,7 +29,7 @@
|
|||||||
name: role-postfix
|
name: role-postfix
|
||||||
|
|
||||||
- include_tasks: yum-check-update.yml
|
- include_tasks: yum-check-update.yml
|
||||||
|
- include_tasks: update-hosts-file.yml
|
||||||
- name: import netdata role
|
- name: import netdata role
|
||||||
import_role:
|
import_role:
|
||||||
name: role-netdata
|
name: role-netdata
|
||||||
|
|||||||
17
update-hosts-file.yml
Normal file
17
update-hosts-file.yml
Normal 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
|
||||||
@ -1,12 +1,17 @@
|
|||||||
---
|
---
|
||||||
|
- name: create destination folder
|
||||||
|
file:
|
||||||
|
path: /usr/local/bin/gmotools
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: get check-yum-update
|
- name: get check-yum-update
|
||||||
copy:
|
copy:
|
||||||
src: /tmp/yumupd/check-yum-updates.sh
|
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
|
mode: 0755
|
||||||
|
|
||||||
- name: create link crontab daily
|
- name: create link crontab daily
|
||||||
file:
|
file:
|
||||||
src: /usr/local/bin/check-yum-updates.sh
|
src: /usr/local/bin/gmotools/check-yum-updates.sh
|
||||||
dest: /etc/cron.daily/check-yum-updates.sh
|
dest: /etc/cron.daily/check-yum-updates
|
||||||
state: link
|
state: link
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user