This message was deleted.
# general
a
This message was deleted.
f
You can (if you want to deploy it on an RKE cluster... If you have another method to deploy clusters, that might make more sense to use) I had this template: (the rest of the playbook might be relevant for the logic here as well)
Copy code
nodes:
{% for host in groups['rancher'] %}
  - address: {{ hostvars[host]['inventory_hostname'] }}
{% if hostvars[host]['internal_ip'] is defined %}
    internal_address: {{ hostvars[host]['internal_ip'] }}
{% endif %}
    user: {{ hostvars[host]['rke_user'] | default(ansible_user) }}
    role: [{{ hostvars[host]['rke_roles'] | default('etcd,controlplane,worker') }}]
{% endfor %}

# TODO: Allow settings
services:
  etcd:
    snapshot: true
    creation: 6h
    retention: 24h

ssh_agent_auth: true
(Starting from a role for K3s or another cluster deployment method might be faster) (I never did upgrades of the RKE cluster with Ansible and used a kubeadm deployed cluster instead when the OS running the RKE cluster reached EoL) (You are probably less likely to have a role lying around for deploying a cluster if you use Rancher to deploy cluster, which we don't - it lacked features (e.g. AWS clusters could not autoscale) and was extremely fragile last time we tried it (~2.2))
👍 1