Started working with Ansible. Added some playbooks.

This commit is contained in:
Max Buz
2024-03-05 13:34:41 +01:00
committed by GitHub
commit 1de07cddb6
2 changed files with 30 additions and 0 deletions

14
apt_upgrade.yml Normal file
View File

@@ -0,0 +1,14 @@
- name: Upgrade packages
hosts: vms
become: true
tasks:
- name: Update cache
ansible.builtin.apt:
update_cache: true
register: cache_updated
- name: Upgrade packages if something is changed
ansible.builtin.apt:
upgrade: "yes"
when: cache_updated.changed