Version 0.1: Inital working deployment version
This commit is contained in:
9
playbooks/shutdown.yml
Normal file
9
playbooks/shutdown.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Shutdown k3s_cluster
|
||||
hosts: k3s_cluster
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- name: Shutdown the nodes (and wait one 1 min)
|
||||
become: true
|
||||
community.general.shutdown:
|
||||
delay: 60
|
||||
29
playbooks/update.yml
Normal file
29
playbooks/update.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- hosts:
|
||||
- all
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Perform a dist-upgrade.
|
||||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
update_cache: yes
|
||||
|
||||
- name: Install essential packages
|
||||
package:
|
||||
name: "{{ package_list }}"
|
||||
state: present
|
||||
|
||||
- name: Check if a reboot is required.
|
||||
ansible.builtin.stat:
|
||||
path: /var/run/reboot-required
|
||||
get_checksum: no
|
||||
register: reboot_required_file
|
||||
|
||||
- name: Reboot the server (if required).
|
||||
ansible.builtin.reboot:
|
||||
when: reboot_required_file.stat.exists == true
|
||||
|
||||
- name: Remove dependencies that are no longer required.
|
||||
ansible.builtin.apt:
|
||||
autoremove: yes
|
||||
Reference in New Issue
Block a user