Fixed docker update

This commit is contained in:
Edgar P. Burkhart 2021-08-22 09:42:26 +02:00
parent 9952cc230b
commit 6de060842e
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -3,8 +3,8 @@
hosts: all
become: yes
vars:
ignore_pkg: [postgresql, postgresql-libs, linux-hardened, linux-headers, linux-api-headers]
#vars:
#ignore_pkg: [postgresql, postgresql-libs, linux-hardened, linux-headers, linux-api-headers]
tasks:
- name: Full system upgrade
@ -12,25 +12,29 @@
update_cache: yes
upgrade: yes
register: syu
changed_when: syu.packages is not subset(ignore_pkg)
#changed_when: syu.packages is not subset(ignore_pkg)
- name: Upgrade Dockers
vars:
utd: "image is up to date"
hosts: aconcagua
tasks:
- name: Docker pull Photoview
command:
chdir: ~/Docker/photoview
cmd: docker-compose pull -q
cmd: docker-compose pull
register: pv_pull
changed_when: pv_pull.stdout != '' or pv_pull.stderr != ''
changed_when: utd not in pv_pull.stderr
notify:
- Restart Photoview
- name: Docker pull Vaultwarden
ansible.builtin.command:
chdir: ~/Docker/vaultwarden
cmd: docker-compose pull -q
cmd: docker-compose pull
register: vw_pull
changed_when: vw_pull.stdout != '' or vw_pull.stderr != ''
changed_when: utd not in vw_pull.stderr
notify:
- Restart Vaultwarden