diff --git a/Makefile b/Makefile index 9f17a17..fa3869c 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,25 @@ RHOST= include $(DIR)/Makefile.variable +update: + @echo "Update packages " ; \ + echo '[service]'> ${DIR}/inventory.yml ; \ + echo "${RSERVER}" >> ${DIR}/inventory.yml ; \ + ansible-playbook -u ${USER} -i ${DIR}/inventory.yml ${DIR}/basic/ls/update.yml -f 5 --private-key=${PKEY} ; \ + echo "Done" ; \ + install-basic: @echo "base install packages " ; \ echo '[service]'> ${DIR}/inventory.yml ; \ echo "${RSERVER}" >> ${DIR}/inventory.yml ; \ - ansible-playbook -u ${USER} -i ${DIR}/inventory.yml ${DIR/}basic/ls/basic.yml -f 5 --private-key=${PKEY} ; \ + ansible-playbook -u ${USER} -i ${DIR}/inventory.yml ${DIR}/basic/ls/basic.yml -f 5 --private-key=${PKEY} ; \ echo "Done" ; \ +install-openjdk: + @echo "install packages openjdk " ; \ + echo '[service]'> ${DIR}/inventory.yml ; \ + echo "${RSERVER}" >> ${DIR}/inventory.yml ; \ + ansible-playbook -u ${USER} -i ${DIR}/inventory.yml ${DIR}/basic/openjdk/java.yml -f 5 --private-key=${PKEY} ; \ + echo "Done" ; \ .PHONY = all env diff --git a/basic/ls/update.yml b/basic/ls/update.yml new file mode 100644 index 0000000..7748c8b --- /dev/null +++ b/basic/ls/update.yml @@ -0,0 +1,23 @@ +--- +- hosts: service + remote_user: "{{ user }}" + gather_facts: no + vars: + user: "zeus" + + tasks: + + # ------------------------ + # apt update + # ------------------------- + - name: apt update packages + become: true + apt: + update_cache: 'yes' + force_apt_get: 'yes' + upgrade: 'dist' + cache_valid_time: 3600 + install_recommends: true + autoremove: true + + diff --git a/inventory.yml b/inventory.yml index dcefc2a..b5e59ac 100644 --- a/inventory.yml +++ b/inventory.yml @@ -1,2 +1,2 @@ [service] -195.130.131.125 +195.130.109.125