|
@@ -1,23 +1,9 @@
|
|
|
---
|
|
---
|
|
|
-- name: Install k3s cluster using Ansible
|
|
|
|
|
- hosts: localhost
|
|
|
|
|
- connection: local
|
|
|
|
|
- gather_facts: no
|
|
|
|
|
|
|
+- name: Install k3s master node
|
|
|
|
|
+ import_playbook: install-k3s-master.yml
|
|
|
|
|
|
|
|
- tasks:
|
|
|
|
|
- - name: Display welcome message
|
|
|
|
|
- debug:
|
|
|
|
|
- msg: "Starting k3s cluster installation with Ansible"
|
|
|
|
|
|
|
+- name: Install k3s workers and join to cluster
|
|
|
|
|
+ import_playbook: install-k3s-workers.yml
|
|
|
|
|
|
|
|
- - name: Run k3s master installation
|
|
|
|
|
- import_playbook: install-k3s-master.yml
|
|
|
|
|
-
|
|
|
|
|
- - name: Run k3s workers installation and join to cluster
|
|
|
|
|
- import_playbook: install-k3s-workers.yml
|
|
|
|
|
-
|
|
|
|
|
- - name: Verify cluster status
|
|
|
|
|
- import_playbook: verify-cluster.yml
|
|
|
|
|
-
|
|
|
|
|
- - name: Display completion message
|
|
|
|
|
- debug:
|
|
|
|
|
- msg: "k3s cluster installation completed successfully!"
|
|
|
|
|
|
|
+- name: Verify k3s cluster status
|
|
|
|
|
+ import_playbook: verify-cluster.yml
|