Add auto-update
* for all hosts, use debops.unattended_upgrades * for docker compose, install a cron job pulling new images and restarting affected containers
This commit is contained in:
parent
09cbe7340f
commit
343a67e0e7
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.vscode
|
|
@ -81,3 +81,10 @@
|
|||
hosts: nginx_hosts:!public_reverse_proxy_hosts
|
||||
roles:
|
||||
- nginx
|
||||
|
||||
- name: Configure unattended upgrades
|
||||
collections: [ 'debops.debops' ]
|
||||
hosts: all
|
||||
become: true
|
||||
roles:
|
||||
- role: unattended_upgrades
|
||||
|
|
|
@ -97,3 +97,11 @@
|
|||
# msg: "If this reports changed, then the docker compose containers changed."
|
||||
# changed_when: (docker_compose__ps_json_before_up.stdout | from_json | community.general.json_query('[].ID') | sort)
|
||||
# != (docker_compose__ps_json_after_up.stdout | from_json | community.general.json_query('[].ID') | sort)
|
||||
|
||||
- name: Install automatic update cron job
|
||||
become: true
|
||||
ansible.builtin.cron:
|
||||
name: 'docker compose auto update'
|
||||
minute: "0"
|
||||
hour: "5"
|
||||
job: "cd /ansible_docker_compose; docker compose pull && docker compose up -d"
|
||||
|
|
Loading…
Reference in a new issue