Ansible/playbooks/upgrade_all_hosts.yml

28 lines
574 B
YAML
Raw Permalink Normal View History

2024-02-10 09:25:27 +00:00
---
- 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
2024-02-10 12:06:07 +00:00
2024-02-10 09:25:27 +00:00
- name: "Clean unwanted olderstuff"
apt:
autoremove: yes
purge: yes
clean: yes
2024-02-10 12:06:07 +00:00
2024-02-10 09:25:27 +00:00
- name: "Fix sysctl file"
ansible.builtin.copy:
src: ../config/sysctl.conf
dest: /etc/sysctl.conf
owner: "root"
group: "root"
mode: 0644
2024-02-10 12:06:07 +00:00
2024-02-10 09:25:27 +00:00
- name: "Reboot all machines"
ansible.builtin.reboot: