# curl -sL https://github.com/gonhvvjvo/PublicScripts/raw/master/Files/prepare-ubuntu-18.04-template-latest.sh | sudo -E bash -
- Import ssh by CMD
ssh-copy-id [email protected]
on client - Run CMD script below
# curl -sL https://github.com/gonhvvjvo/PublicScripts/raw/master/Files/prepare-ubuntu-18.04-template-ansible.sh | sudo -E bash -
mkdir -p /opt/scripts/
cat <<EOF | sudo tee /opt/scripts/monthly-yum-update.sh
#!/bin/bash
########## Update all ##########
yum update -y && yum upgrade -y && reboot
EOF
chmod +x /opt/scripts/monthly-yum-update.sh
0 1 17 * * sh /opt/scripts/monthly-yum-update.sh >/dev/null 2>&1
cat <<EOF | sudo tee /opt/scripts/weekly-da-update.sh
#!/bin/bash
########## Update all ##########
#/usr/local/directadmin/custombuild/build update
#/usr/local/directadmin/custombuild/build all d
########## Update only new version ##########
/usr/local/directadmin/custombuild/build update_versions
EOF
chmod +x /opt/scripts/weekly-da-update.sh
0 3 * * 0 sh /opt/scripts/weekly-da-update.sh >/dev/null 2>&1