From 627afbd4162f03124a57ee196a9716c067fbd8e3 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 24 Oct 2022 13:27:49 +0300 Subject: [PATCH] check for stats --- tasks/configure.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index a8a424a..c455f14 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -45,6 +45,7 @@ set_fact: puppet_agent_cmd: "{{ puppet_which.stdout }}" when: + - puppet_which_stat - puppet_which_stat.stat.exists - not puppet_which_stat.stat.isdir - puppet_which_stat.stat.executable @@ -70,10 +71,11 @@ when: - not puppet_agent_cmd -- name: Set puppet agent command (from which) +- name: Set puppet agent command (from whereis) set_fact: puppet_agent_cmd: "{{ puppet_whereis.stdout }}" when: + - puppet_whereis_stat - puppet_whereis_stat.stat.exists - not puppet_whereis_stat.stat.isdir - puppet_whereis_stat.stat.executable