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

31 lines
737 B
YAML
Raw Normal View History

2023-11-16 16:40:45 +01:00
---
2023-12-07 16:56:43 +01:00
- name: "Check if {{ path_docker_compose_instances }} directory exists"
2023-11-16 16:40:45 +01:00
stat:
2023-12-07 16:56:43 +01:00
path: "{{ path_docker_compose_instances }}"
2023-11-16 16:40:45 +01:00
register: docker_compose_directory_stat
- name: "Update with pacman"
include_role:
name: update-pacman
2023-11-17 00:45:37 +01:00
when: ansible_distribution == 'Archlinux'
2023-11-16 16:40:45 +01:00
- name: "Update with apt"
include_role:
name: update-apt
2023-11-17 00:45:37 +01:00
when: ansible_distribution == "Debian"
2023-11-16 16:40:45 +01:00
- name: "Update Docker Images"
include_role:
name: update-docker
2023-12-03 16:20:30 +01:00
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