Ansible/playbooks/upgrade_all_hosts.yml
2024-02-19 22:13:44 +01:00

28 lines
577 B
YAML

---
- hosts: all
become: yes
tasks:
- name: "Update cache & Full system update"
apt:
update_cache: true
upgrade: dist
cache_valid_time: 3600
force_apt_get: true
- name: "Clean unwanted olderstuff"
apt:
autoremove: yes
purge: yes
clean: yes
- name: "Fix sysctl file"
ansible.builtin.copy:
src: ../templates/sysctl.conf
dest: /etc/sysctl.conf
owner: "root"
group: "root"
mode: 0644
- name: "Reboot all machines"
ansible.builtin.reboot: