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
3 changed files with 16 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue