File tree 15 files changed +53
-19
lines changed
molecule/highavailabilitydb
15 files changed +53
-19
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ vagrant/ubuntu-*.log
9
9
__pycache__
10
10
ansible.cfg
11
11
pyratlabs-issue-dump.txt
12
+ .cache
Original file line number Diff line number Diff line change 14
14
---
15
15
-->
16
16
17
+ ## 2021-03-14, v2.8.0
18
+
19
+ Happy π day!
20
+
21
+ ### Notable changes
22
+
23
+ - Updated GitHub Actions, resolved linting errors.
24
+ - Renamed ` k3s_control_node_address ` -> ` k3s_registration_address `
25
+
26
+ ### Breaking changes
27
+
28
+ - A task has been added to rename ` k3s_control_node_address ` to
29
+ ` k3s_registration_address ` for any users still using this variable name,
30
+ however this might still break something.
31
+
32
+ ---
33
+
17
34
## 2021-02-28, v2.7.1
18
35
19
36
### Notable changes
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ consistency. These are generally cluster-level configuration.
67
67
| ` k3s_release_version ` | Use a specific version of k3s, eg. ` v0.2.0 ` . Specify ` false ` for stable. | ` false ` |
68
68
| ` k3s_config_file ` | Location of the k3s configuration file. | ` /etc/rancher/k3s/config.yaml ` |
69
69
| ` k3s_build_cluster ` | When multiple play hosts are available, attempt to cluster. Read notes below. | ` true ` |
70
- | ` k3s_control_node_address ` | Use a specific control node address . IP or FQDN. | NULL |
70
+ | ` k4s_registration_address ` | Fixed registration address for nodes . IP or FQDN. | NULL |
71
71
| ` k3s_github_url ` | Set the GitHub URL to install k3s from. | https://github.com/k3s-io/k3s |
72
72
| ` k3s_install_dir ` | Installation directory for k3s. | ` /usr/local/bin ` |
73
73
| ` k3s_install_hard_links ` | Install using hard links rather than symbolic links. | ` false ` |
@@ -314,7 +314,7 @@ stable release:
314
314
` ` ` yaml
315
315
- hosts: k3s_nodes
316
316
vars:
317
- k3s_control_node_address : loadbalancer # Typically a load balancer.
317
+ k3s_registration_address : loadbalancer # Typically a load balancer.
318
318
k3s_server:
319
319
datastore-endpoint: "postgres://postgres:verybadpass@database:5432/postgres?sslmode=disable"
320
320
pre_tasks:
Original file line number Diff line number Diff line change 2
2
3
3
galaxy_info :
4
4
role_name : k3s
5
+ namespace : xanmanning
5
6
author : Xan Manning
6
7
description : Ansible role for installing k3s as either a standalone server or HA cluster
7
8
company : Pyrat Ltd.
Original file line number Diff line number Diff line change 5
5
become : true
6
6
vars :
7
7
molecule_is_test : true
8
- k3s_control_node_address : loadbalancer
8
+ k3s_registration_address : loadbalancer
9
9
k3s_server :
10
10
datastore-endpoint : " postgres://postgres:verybadpass@database:5432/postgres?sslmode=disable"
11
11
pre_tasks :
Original file line number Diff line number Diff line change 79
79
- import_tasks : ../validate/state/control-plane.yml
80
80
when : not k3s_skip_validation
81
81
82
- - meta : flush_handlers
82
+ - name : Flush Handlers
83
+ meta : flush_handlers
83
84
84
85
- import_tasks : ../validate/state/nodes.yml
85
86
when : not k3s_skip_validation
Original file line number Diff line number Diff line change 8
8
- restart docker
9
9
become : " {{ k3s_become_for_package_install | ternary(true, false, k3s_become_for_all) }}"
10
10
11
- - meta : flush_handlers
11
+ - name : Flush Handlers
12
+ meta : flush_handlers
Original file line number Diff line number Diff line change 12
12
- restart docker
13
13
become : " {{ k3s_become_for_package_install | ternary(true, false, k3s_become_for_all) }}"
14
14
15
- - meta : flush_handlers
15
+ - name : Flush Handlers
16
+ meta : flush_handlers
Original file line number Diff line number Diff line change 12
12
- restart docker
13
13
become : " {{ k3s_become_for_package_install | ternary(true, false, k3s_become_for_all) }}"
14
14
15
- - meta : flush_handlers
15
+ - name : Flush Handlers
16
+ meta : flush_handlers
Original file line number Diff line number Diff line change 12
12
- restart docker
13
13
become : " {{ k3s_become_for_package_install | ternary(true, false, k3s_become_for_all) }}"
14
14
15
- - meta : flush_handlers
15
+ - name : Flush Handlers
16
+ meta : flush_handlers
Original file line number Diff line number Diff line change 11
11
or (k3s_primary_control_node and k3s_controller_list | length > 1))
12
12
- not ansible_check_mode
13
13
14
- - meta : flush_handlers
14
+ - name : Flush Handlers
15
+ meta : flush_handlers
15
16
16
17
- include_tasks : install-k3s-node.yml
17
18
when : k3s_build_cluster
Original file line number Diff line number Diff line change 5
5
k3s_build_cluster : false
6
6
when :
7
7
- ansible_play_hosts_all | length < 2
8
- - k3s_control_node_address is not defined
8
+ - k3s_registration_address is not defined
9
9
10
10
- name : Ensure k3s control node fact is set
11
11
ansible.builtin.set_fact :
93
93
check_mode : false
94
94
when : k3s_control_delegate is not defined
95
95
96
- - name : Ensure the control node address is registered in Ansible
96
+ - name : Ensure the node registration address is defined from k3s_control_node_address
97
97
ansible.builtin.set_fact :
98
- k3s_control_node_address : " {{ hostvars[k3s_control_delegate].ansible_host | default(hostvars[k3s_control_delegate].ansible_fqdn) }}"
98
+ k3s_registration_address : " {{ k3s_control_node_address }}"
99
99
check_mode : false
100
- when : k3s_control_node_address is not defined
100
+ when : k3s_control_node_address is defined
101
101
102
- when : k3s_control_node_address is not defined
102
+ - name : Ensure the node registration address is defined
103
+ ansible.builtin.set_fact :
104
+ k3s_registration_address : " {{ hostvars[k3s_control_delegate].ansible_host | default(hostvars[k3s_control_delegate].ansible_fqdn) }}"
105
+ check_mode : false
106
+ when :
107
+ - k3s_registration_address is not defined
108
+ - k3s_control_node_address is not defined
109
+
110
+ when : k3s_registration_address is not defined
103
111
or k3s_control_delegate is not defined
104
112
105
113
- name : Ensure k3s_runtime_config is set for control plane
Original file line number Diff line number Diff line change 29
29
- ('docker' in k3s_runtime_config and k3s_runtime_config.docker)
30
30
- ('rootless' not in k3s_runtime_config or not k3s_runtime_config.rootless)
31
31
32
- - meta : flush_handlers
32
+ - name : Flush Handlers
33
+ meta : flush_handlers
33
34
34
35
- import_tasks : build/download-k3s.yml
35
36
49
50
when :
50
51
- k3s_build_cluster is defined
51
52
- k3s_build_cluster
52
- - k3s_control_node_address is defined
53
+ - k3s_registration_address is defined
Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ ExecStart={{ k3s_install_dir }}/k3s
29
29
{% if k 3s_control_node %}
30
30
server
31
31
{% if (k 3s_etcd_datastore is defined and k 3s_etcd_datastore ) and (k 3s_primary_control_node is not defined or not k 3s_primary_control_node ) and k 3s_controller_list | length > 1 %}
32
- --server https://{{ k3s_control_node_address }}:{{ k3s_control_plane_port | default(6443) }}
32
+ --server https://{{ k3s_registration_address }}:{{ k3s_control_plane_port | default(6443) }}
33
33
--token-file {{ k3s_token_location }}
34
34
{% endif %}
35
35
{% if k 3s_server is defined %}
36
36
--config {{ k3s_config_file }}
37
37
{% endif %}
38
38
{% else %}
39
39
agent
40
- --server https://{{ k3s_control_node_address }}:{{ k3s_control_plane_port | default(6443) }}
40
+ --server https://{{ k3s_registration_address }}:{{ k3s_control_plane_port | default(6443) }}
41
41
--token-file {{ k3s_token_location }}
42
42
{% if k 3s_agent is defined %}
43
43
--config {{ k3s_config_file }}
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ k3s_ensure_directories_exist:
107
107
# Config items that should not appear in k3s_server or k3s_agent
108
108
k3s_config_exclude :
109
109
- setting : server
110
- correction : k3s_control_node_address
110
+ correction : k3s_registration_address
111
111
- setting : cluster-init
112
112
correction : k3s_etcd_datastore
113
113
- setting : token
You can’t perform that action at this time.
0 commit comments