add yum-update script

This commit is contained in:
Gilles Mouchet 2024-06-16 18:54:48 +02:00
parent d9eba4c710
commit e13b8c9a48
3 changed files with 21 additions and 5 deletions

View File

@ -151,7 +151,7 @@ printSuccess "Date and Time updated successfully"
# get yum-check-update script # get yum-check-update script
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
printInfo "Get yum-check-update script" printInfo "Get yum-check-update script"
git clone https://gitweb.dyndns.org/scripts/yum-check.git /tmp/ git clone https://gitweb.dyndns.org/scripts/yum-check.git /tmp/yumupd
if [ $? -ne 0 ]; then printError "Problem to clone yum-check-update script";exit; fi if [ $? -ne 0 ]; then printError "Problem to clone yum-check-update script";exit; fi
printSuccess "yum-check-update script cloned successfully" printSuccess "yum-check-update script cloned successfully"

View File

@ -16,9 +16,7 @@
import_role: import_role:
name: role-postfix name: role-postfix
- name: import yum-check role - include_tasks: yum-check-update.yml
import_role:
name: role-yum-check
- name: import netdata role - name: import netdata role
import_role: import_role:

18
yum-check-update.yml Normal file
View File

@ -0,0 +1,18 @@
---
- name: get check-yum-update
copy:
src: /tmp/yumupd/check-yum-updates.sh
dest: /usr/local/bin/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
state: link
- name: delete source
file:
path: /tmp/yumupd
state: absent