This commit is contained in:
James Turland
2024-05-08 12:30:25 +01:00
parent a7b12f0b32
commit 13bf31486f
20 changed files with 559 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# Copy agent config to all agents - we need to change agent2 & 3 later with the token
- name: Deploy RKE2 Agent Configuration
ansible.builtin.template:
src: templates/rke2-agent-config.j2
dest: /etc/rancher/rke2/config.yaml
owner: root
group: root
mode: '0644'
when: inventory_hostname in groups['agents']
# Check agents have restarted to pick up config
- name: Ensure RKE2 agents are enabled and running
ansible.builtin.systemd:
name: rke2-agent
enabled: true
state: restarted
daemon_reload: true