fastrabbit/ansible/playbooks/os-linux-apt-update.yml
2024-09-19 13:29:35 +03:00

23 lines
572 B
YAML

---
- hosts: "{{ hosts_target }}"
become: false
gather_facts: true
vars_files:
- /root/.secret/.ansible/vars_creds.yml
tasks:
- name: Upgrage system type of Debian
block:
- name: Run "apt update" and "apt upgrade"
ansible.builtin.apt:
upgrade: yes
update_cache: yes
- name: Run "apt autoremove"
ansible.builtin.apt:
autoremove: yes
- name: Run "apt-get clean"
ansible.builtin.apt:
clean: yes
when: ansible_facts['distribution'] == "Debian"