main-playbook.yml 614 B

1234567891011121314151617181920212223
  1. ---
  2. - name: Install k3s cluster using Ansible
  3. hosts: localhost
  4. connection: local
  5. gather_facts: no
  6. tasks:
  7. - name: Display welcome message
  8. debug:
  9. msg: "Starting k3s cluster installation with Ansible"
  10. - name: Run k3s master installation
  11. import_playbook: install-k3s-master.yml
  12. - name: Run k3s workers installation and join to cluster
  13. import_playbook: install-k3s-workers.yml
  14. - name: Verify cluster status
  15. import_playbook: verify-cluster.yml
  16. - name: Display completion message
  17. debug:
  18. msg: "k3s cluster installation completed successfully!"