mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2026-10-23 03:22:03 +02:00
Add HA option, change to yaml inventory, cleanup
- HA option for multiple server nodes using embedded etcd - Switch to yaml inventory file for easier editing and combining vars - Update to full ansible module names - Change master/node names to server/agent - Cleanup small linting errors - Add reboot playbook which staggers reboot to keep HA cluster up - Move playbooks to playbook directory Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
1 parent
1031ea3ce2
commit
df67c61ba5
21 files changed
+126
-86
No files matched your search
@@ -0,0 +1,12 @@
|
||||
---
|
||||
k3s_server_location: /var/lib/rancher/k3s
|
||||
server_init_args: >-
|
||||
{% if groups['server'] | length > 1 %}
|
||||
--token {{ k3s_token }}
|
||||
{% if ansible_host == hostvars[groups['server'][0]]['ansible_host'] | default(groups['server'][0]) %}
|
||||
--cluster-init
|
||||
{% else %}
|
||||
--server https://{{ hostvars[groups['server'][0]]['ansible_host'] | default(groups['server'][0]) }}:{{ api_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ extra_server_args | default('') }}
|
||||
Reference in new issue
Block a user