Files
hatarashi-pasokom/hatarashi-pasokom.yaml
shmick 0e54e27ca1
Some checks failed
Ansible Deploy / deploy (push) Failing after 56s
Oh my fucking god
2023-11-24 09:15:50 +02:00

24 lines
656 B
YAML

---
- hosts: takahe
gather_facts: no
become: yes
vars:
ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}"
- name: Update all installed packages using APT module
ansible.builtin.apt:
name: '*'
state: latest
update_cache: yes
only_upgrade: yes
register: apt_update_status
- name: Remove packages not needed anymore
ansible.builtin.apt:
autoremove: yes
- name: Reboot when packages were updated
ansible.builtin.reboot:
post_reboot_delay: 60
when: apt_update_status.changed