Ansible/playbooks/upgrade_all_hosts.yml

25 lines
571 B
YAML
Raw 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
- name: "Clean unwanted olderstuff"
apt:
autoremove: yes
purge: yes
clean: yes
- name: "Fix sysctl file"
ansible.builtin.copy:
src: ../config/sysctl.conf
dest: /etc/sysctl.conf
owner: "root"
group: "root"
mode: 0644
- name: "Reboot all machines"
ansible.builtin.reboot: