Updated upgrade.yml with task status
This commit is contained in:
parent
a449d3f3db
commit
8819fa68bd
1 changed files with 31 additions and 7 deletions
38
upgrade.yml
38
upgrade.yml
|
@ -2,20 +2,44 @@
|
||||||
- name: Upgrade hosts
|
- name: Upgrade hosts
|
||||||
hosts: all
|
hosts: all
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
vars:
|
||||||
|
ignore_pkg: [postgresql, postgresql-libs, linux-hardened, linux-headers, linux-api-headers]
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Full system upgrade
|
- name: Full system upgrade
|
||||||
pacman:
|
pacman:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
upgrade: yes
|
upgrade: yes
|
||||||
|
register: syu
|
||||||
|
changed_when: syu.packages is not subset(ignore_pkg)
|
||||||
|
|
||||||
- name: Upgrade Dockers
|
- name: Upgrade Dockers
|
||||||
hosts: all
|
hosts: aconcagua
|
||||||
tasks:
|
tasks:
|
||||||
- name: Docker upgrade Photoview
|
- name: Docker pull Photoview
|
||||||
ansible.builtin.shell:
|
command:
|
||||||
chdir: ~/Docker/photoview-docker
|
chdir: ~/Docker/photoview-docker
|
||||||
cmd: docker-compose pull -q && docker-compose up -d
|
cmd: docker-compose pull -q
|
||||||
- name: Docker upgrade Vaultwarden
|
register: pv_pull
|
||||||
ansible.builtin.shell:
|
changed_when: "pv_pull.stdout != ''"
|
||||||
|
notify:
|
||||||
|
- Restart Photoview
|
||||||
|
- name: Docker pull Vaultwarden
|
||||||
|
ansible.builtin.command:
|
||||||
chdir: ~/Docker/vaultwarden
|
chdir: ~/Docker/vaultwarden
|
||||||
cmd: docker-compose pull -q && docker-compose up -d
|
cmd: docker-compose pull -q
|
||||||
|
register: vw_pull
|
||||||
|
changed_when: "vw_pull.stdout != ''"
|
||||||
|
notify:
|
||||||
|
- Restart Vaultwarden
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- name: Restart Photoview
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: ~/Docker/photoview-docker
|
||||||
|
cmd: docker-compose up -d
|
||||||
|
- name: Restart Vaultwarden
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: ~/Docker/vaultwarden
|
||||||
|
cmd: docker-compose up -d
|
||||||
|
|
Reference in a new issue