mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-11-05 13:23:30 +01:00
Merge pull request #55 from onedr0p/patch-3
Implement setting multiple k3s_tls_san
This commit is contained in:
commit
9a15d8eddf
2 changed files with 23 additions and 17 deletions
|
@ -216,7 +216,7 @@ Please note that this may potentially break setting up agents.
|
||||||
Below are variables that are set against specific hosts in your inventory.
|
Below are variables that are set against specific hosts in your inventory.
|
||||||
|
|
||||||
| Variable | Description | Default Value |
|
| Variable | Description | Default Value |
|
||||||
|-----------------------------|--------------------------------------------------------------------------|------------------------|
|
|-----------------------------|----------------------------------------------------------------------------------|------------------------|
|
||||||
| `k3s_control_node` | Define the host as a control plane node, (True/False). | `false` |
|
| `k3s_control_node` | Define the host as a control plane node, (True/False). | `false` |
|
||||||
| `k3s_node_name` | Define the name of this node. | `$(hostname)` |
|
| `k3s_node_name` | Define the name of this node. | `$(hostname)` |
|
||||||
| `k3s_node_id` | Define the ID of this node. | _NULL_ |
|
| `k3s_node_id` | Define the ID of this node. | _NULL_ |
|
||||||
|
@ -229,7 +229,7 @@ Below are variables that are set against specific hosts in your inventory.
|
||||||
| `k3s_kube_proxy_args` | A list of kube proxy args to pass to the server. | [] |
|
| `k3s_kube_proxy_args` | A list of kube proxy args to pass to the server. | [] |
|
||||||
| `k3s_node_taints` | List of node taints. | _NULL_ |
|
| `k3s_node_taints` | List of node taints. | _NULL_ |
|
||||||
| `k3s_node_data_dir` | Folder to hold state. | `/var/lib/rancher/k3s` |
|
| `k3s_node_data_dir` | Folder to hold state. | `/var/lib/rancher/k3s` |
|
||||||
| `k3s_tls_san` | Add additional hosname or IP as Subject Alternate Name in the TLS cert. | _NULL_ |
|
| `k3s_tls_san` | A list of additional hosnames or IPs as Subject Alternate Name in the TLS cert. | [] |
|
||||||
|
|
||||||
#### Important note about `k3s_control_node` and High Availability (HA)
|
#### Important note about `k3s_control_node` and High Availability (HA)
|
||||||
|
|
||||||
|
|
|
@ -145,9 +145,15 @@ ExecStart={{ k3s_install_dir }}/k3s
|
||||||
{% if k3s_resolv_conf is defined and k3s_resolv_conf %}
|
{% if k3s_resolv_conf is defined and k3s_resolv_conf %}
|
||||||
--resolv-conf {{ k3s_resolv_conf }}
|
--resolv-conf {{ k3s_resolv_conf }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if k3s_tls_san is defined and k3s_tls_san is iterable %}
|
||||||
|
{% for san in k3s_tls_san %}
|
||||||
|
--tls-san {{ san }}
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
{% if k3s_tls_san is defined and k3s_tls_san %}
|
{% if k3s_tls_san is defined and k3s_tls_san %}
|
||||||
--tls-san {{ k3s_tls_san }}
|
--tls-san {{ k3s_tls_san }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if k3s_node_data_dir is defined %}
|
{% if k3s_node_data_dir is defined %}
|
||||||
--data-dir {{ k3s_node_data_dir }}
|
--data-dir {{ k3s_node_data_dir }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue