Fixed docker update
This commit is contained in:
parent
9952cc230b
commit
6de060842e
1 changed files with 11 additions and 7 deletions
18
upgrade.yml
18
upgrade.yml
|
@ -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
|
||||
|
||||
|
|
Reference in a new issue