Browse Source

add update

master
zeus 4 years ago
parent
commit
95d7313cf4
  1. 15
      Makefile
  2. 23
      basic/ls/update.yml
  3. 2
      inventory.yml

15
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

23
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

2
inventory.yml

@ -1,2 +1,2 @@
[service]
195.130.131.125
195.130.109.125

Loading…
Cancel
Save