From ab2a75d6ab62913995f1d9d1be677cc410a24183 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Fri, 21 Oct 2022 21:24:27 +0300 Subject: [PATCH] check for isdir --- tasks/configure.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index d183616..c82cccb 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -23,11 +23,12 @@ when: - which_puppet.stdout != "" - which_puppet_stat.stat.executable + - not which_puppet_stat.stat.isdir - name: Set fact for puppet path to estimated path when not found set_fact: puppet_cmd: "/usr/local/bin/puppet" - when: which_puppet.stdout == "" or not which_puppet_stat.stat.executable + when: which_puppet.stdout == "" or not which_puppet_stat.stat.executable or which_puppet_stat.isdir - name: Obtain puppet configuration directory shell: "{{ puppet_cmd }} config print confdir"