mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-11-22 11:48:22 +01:00
Change terminology of tasks to remove "master"
This commit is contained in:
parent
a99087c7f6
commit
8c791cb611
@ -27,15 +27,15 @@ env:
|
||||
- MOLECULE_DISTRO: geerlingguy/docker-fedora31-ansible:latest
|
||||
MOLECULE_SCENARIO: nodeploy
|
||||
|
||||
# Test multiple masters in control plane with PostgreSQL
|
||||
# Test multiple control nodes in control plane with PostgreSQL
|
||||
- MOLECULE_DISTRO: geerlingguy/docker-fedora29-ansible:latest
|
||||
MOLECULE_SCENARIO: highavailabilitydb
|
||||
|
||||
# Test multiple masters with auto deploying manifests
|
||||
# Test multiple control nodes with auto deploying manifests
|
||||
- MOLECULE_DISTRO: geerlingguy/docker-fedora30-ansible:latest
|
||||
MOLECULE_SCENARIO: autodeploy
|
||||
|
||||
# Test multiple masters in control plane with Etcd
|
||||
# Test multiple control nodes in control plane with Etcd
|
||||
- MOLECULE_DISTRO: geerlingguy/docker-centos8-ansible:latest
|
||||
MOLECULE_SCENARIO: highavailabilityetcd
|
||||
|
||||
|
@ -57,13 +57,13 @@
|
||||
- restart k3s
|
||||
become: "{{ k3s_become_for_install_dir | ternary(true, false, k3s_become_for_all) }}"
|
||||
|
||||
- name: Ensure secondary masters are started
|
||||
- name: Ensure secondary controllers are started
|
||||
service:
|
||||
name: k3s
|
||||
state: started
|
||||
enabled: true
|
||||
register: ensure_secondary_masters_started
|
||||
until: ensure_secondary_masters_started is succeeded
|
||||
register: ensure_secondary_controllers_started
|
||||
until: ensure_secondary_controllers_started is succeeded
|
||||
retries: "{{ play_hosts | length }}"
|
||||
delay: 5
|
||||
when: k3s_control_node and not k3s_primary_control_node
|
||||
|
@ -5,7 +5,7 @@
|
||||
k3s_control_node: "{{ 'false' if k3s_build_cluster else 'true' }}"
|
||||
when: k3s_control_node is not defined
|
||||
|
||||
- name: Ensure k3s master control node fact is set
|
||||
- name: Ensure k3s primary control node fact is set
|
||||
set_fact:
|
||||
k3s_primary_control_node: "{{ 'false' if k3s_build_cluster else 'true' }}"
|
||||
when: k3s_primary_control_node is not defined
|
||||
@ -19,7 +19,7 @@
|
||||
when: true not in (hostvars | json_query('*.k3s_control_node'))
|
||||
and k3s_build_cluster is defined and k3s_build_cluster
|
||||
|
||||
- name: Ensure a count of control masters is generated
|
||||
- name: Ensure a count of control nodes is generated
|
||||
set_fact:
|
||||
k3s_controller_count: "{{ k3s_controller_count + [ item ] }}"
|
||||
when: hostvars[item].k3s_control_node is defined
|
||||
@ -52,7 +52,7 @@
|
||||
check_mode: false
|
||||
when: hostvars[item].k3s_control_node is defined
|
||||
|
||||
- name: Delegate a master control plane node
|
||||
- name: Delegate a control plane node
|
||||
block:
|
||||
- name: Lookup control node from file
|
||||
command: "grep '{{ 'P_True' if (k3s_controller_count | length > 1) else 'C_True' }}' /tmp/inventory.txt"
|
||||
|
@ -9,5 +9,5 @@
|
||||
and k3s_runtime_config.rootless
|
||||
and k3s_use_unsupported_config
|
||||
|
||||
- import_tasks: check-master-count.yml
|
||||
- import_tasks: check-control-count.yml
|
||||
when: k3s_build_cluster is defined and k3s_build_cluster
|
||||
|
Loading…
Reference in New Issue
Block a user