Skip to content

Commit

Permalink
No need to stat for a directory before creating it with file module
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael DAmato authored and Michael DAmato committed Apr 24, 2024
1 parent 8afb7ba commit 28f1240
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/rke2_common/tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
ansible.builtin.file:
path: /etc/rancher/rke2
state: directory
mode: "0750"

- name: Does the /etc/rancher/rke2/config.yaml file exist?
ansible.builtin.stat:
Expand Down Expand Up @@ -35,7 +36,6 @@
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 28f1240

Please sign in to comment.