From 28f1240a8b5baf9f1f0657f64b430ff26fbd7ba4 Mon Sep 17 00:00:00 2001 From: Michael DAmato Date: Wed, 24 Apr 2024 08:40:26 -0400 Subject: [PATCH] No need to stat for a directory before creating it with file module --- roles/rke2_common/tasks/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/rke2_common/tasks/config.yml b/roles/rke2_common/tasks/config.yml index 450d240..b755f8c 100644 --- a/roles/rke2_common/tasks/config.yml +++ b/roles/rke2_common/tasks/config.yml @@ -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: @@ -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([]) }}"