check for isdir
This commit is contained in:
parent
8963ab4064
commit
ab2a75d6ab
1 changed files with 2 additions and 1 deletions
|
@ -23,11 +23,12 @@
|
||||||
when:
|
when:
|
||||||
- which_puppet.stdout != ""
|
- which_puppet.stdout != ""
|
||||||
- which_puppet_stat.stat.executable
|
- which_puppet_stat.stat.executable
|
||||||
|
- not which_puppet_stat.stat.isdir
|
||||||
|
|
||||||
- name: Set fact for puppet path to estimated path when not found
|
- name: Set fact for puppet path to estimated path when not found
|
||||||
set_fact:
|
set_fact:
|
||||||
puppet_cmd: "/usr/local/bin/puppet"
|
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
|
- name: Obtain puppet configuration directory
|
||||||
shell: "{{ puppet_cmd }} config print confdir"
|
shell: "{{ puppet_cmd }} config print confdir"
|
||||||
|
|
Loading…
Reference in a new issue