Skip to content

Commit

Permalink
add playbook: simple update and reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
lanefu committed Jul 28, 2024
1 parent f75639b commit 68ad79f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
7 changes: 3 additions & 4 deletions playbooks/provision_k8s_cluster.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---

- hosts:
- k3s_nodes
- k3s_nodes

vars:
k3s_become: true
k3s_etcd_datastore: true
k3s_server:
cluster-cidr: 172.31.0.0/16
tls-san:
- 172.17.20.40

tasks:

- name: provison whole cluster
import_role:
name: xanmanning.k3s
tags:
- provison
- k3s

18 changes: 18 additions & 0 deletions playbooks/update_k8s_nodes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
- name: Update packages and reboot
hosts:
- k3s_nodes

tasks:
- name: Update all packages
apt:
name: "*"
state: latest
tags:
- apt
- udate

- name: Reboot k3s_nodes
reboot:
tags:
- reboot

0 comments on commit 68ad79f

Please sign in to comment.