Skip to content

Commit

Permalink
Merge pull request #215 from rancherfederal/AL-fixes-2
Browse files Browse the repository at this point in the history
Testing for 214
  • Loading branch information
aleiner authored Apr 25, 2024
2 parents c8264a7 + 28f1240 commit 1f9d0b3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions roles/rke2_common/tasks/config.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
---
- name: Does the /etc/rancher/rke2 dir exist?
ansible.builtin.stat:
path: /etc/rancher/rke2
register: rke2_directory

- name: Create the /etc/rancher/rke2 config dir
ansible.builtin.file:
path: /etc/rancher/rke2
state: directory
recurse: yes
when: not rke2_directory.stat.exists
mode: "0750"

- name: Does the /etc/rancher/rke2/config.yaml file exist?
ansible.builtin.stat:
Expand All @@ -36,8 +30,12 @@
group: root
when: not previous_rke2_config.stat.exists

# --node-label value (agent/node) Registering and starting kubelet with set of labels
# https://github.com/ansible-collections/ansible.utils/issues/135
- name: Ensure Ansible renders any templated variables in rke2_config
ansible.builtin.set_fact:
rke2_config: "{{ rke2_config | default({}) }}"

# --node-label value (agent/node) Registering and starting kubelet with set of labels
- name: Get rke2_config node-labels
ansible.builtin.set_fact:
rke2_config_node_labels: "{{ rke2_config['node-label'] | default([]) }}"
Expand Down

0 comments on commit 1f9d0b3

Please sign in to comment.