computer-playbook/roles/update/tasks/main.yml

31 lines
747 B
YAML

---
- name: "Check if {{ docker_compose_instances_directory }} directory exists"
stat:
path: "{{ docker_compose_instances_directory }}"
register: docker_compose_directory_stat
- name: "Update with pacman"
include_role:
name: update-pacman
when: ansible_distribution == 'Archlinux'
- name: "Update with apt"
include_role:
name: update-apt
when: ansible_distribution == "Debian"
- name: "Update Docker Images"
include_role:
name: update-docker
when: docker_compose_directory_stat.stat.exists
- name: "Check if yay is installed"
command: which yay
ignore_errors: yes
register: yay_installed
changed_when: false
- name: "Update with yay"
include_role:
name: update-yay
when: yay_installed.rc == 0