add clean up
This commit is contained in:
parent
e13b8c9a48
commit
b1a33ebbec
@ -34,17 +34,17 @@ alias sudo='sudo --preserve-env=PATH env' # https://www.petefreitag.com/blog/env
|
|||||||
if ! is_scp; then
|
if ! is_scp; then
|
||||||
if [[ "$USER" == "gilles" || "$USER" == "root" ]]; then
|
if [[ "$USER" == "gilles" || "$USER" == "root" ]]; then
|
||||||
host_fqdn=$(hostname)
|
host_fqdn=$(hostname)
|
||||||
host_shot=$(hostname -s)
|
host_short=$(hostname -s)
|
||||||
ip=$(hostname -I)
|
ip=$(hostname -I)
|
||||||
dist=$(cat /etc/redhat-release)
|
dist=$(cat /etc/redhat-release)
|
||||||
kern=$(uname -r)
|
kern=$(uname -r)
|
||||||
cat << EOF
|
cat << EOF
|
||||||
-----------------------------------------------------
|
---------------------------------------------------------
|
||||||
Host name (fqdn): $host_fqdn
|
Host name (fqdn): $host_fqdn
|
||||||
Host name (short): $host_short
|
Host name (short): $host_short
|
||||||
Distribution: $dist
|
Distribution: $dist
|
||||||
Kernel: $kern
|
Kernel: $kern
|
||||||
-----------------------------------------------------
|
----------------------------------------------------------
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
10
inst-raps.sh
10
inst-raps.sh
@ -168,9 +168,17 @@ printSuccess "Role updated successfully"
|
|||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
printInfo "Execute playbook"
|
printInfo "Execute playbook"
|
||||||
~/.local/bin/ansible-playbook main.yml --vault-password-file ~/ansible/.vault_pass.txt
|
~/.local/bin/ansible-playbook main.yml --vault-password-file ~/ansible/.vault_pass.txt
|
||||||
if [ $? -ne 0 ]; then printError "Problem to execute playbook";exit; fi
|
if [ $? -ne 0 ]; then printError "Problem to execute playbook" fi
|
||||||
printSuccess "Ansible playbook finished"
|
printSuccess "Ansible playbook finished"
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Clean upset timezone
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
printInfo "CleanUp"
|
||||||
|
rm -rf /tmp/yumupd
|
||||||
|
if [ $? -ne 0 ]; then printError "Problem to cleanUP";exit; fi
|
||||||
|
printSuccess "successfully"
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# set timezone
|
# set timezone
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -10,9 +10,3 @@
|
|||||||
src: /usr/local/bin/check-yum-updates.sh
|
src: /usr/local/bin/check-yum-updates.sh
|
||||||
dest: /etc/cron.daily/check-yum-updates.sh
|
dest: /etc/cron.daily/check-yum-updates.sh
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
- name: delete source
|
|
||||||
file:
|
|
||||||
path: /tmp/yumupd
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user