diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-25 14:40:44 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-25 14:40:44 +0100 |
commit | b02a8c40c76cb2e61c7a664ec156407101201a24 (patch) | |
tree | 0e046b783331db1bbba78bee75dbdac2e67e420a /roles/common/tasks/tool.yml | |
parent | linting (diff) | |
download | maintenance-b02a8c40c76cb2e61c7a664ec156407101201a24.tar.gz maintenance-b02a8c40c76cb2e61c7a664ec156407101201a24.zip |
move tool existence conditionals to role common
Diffstat (limited to '')
-rw-r--r-- | roles/common/tasks/tool.yml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/common/tasks/tool.yml b/roles/common/tasks/tool.yml new file mode 100644 index 0000000..f8fda64 --- /dev/null +++ b/roles/common/tasks/tool.yml @@ -0,0 +1,8 @@ +- name: "Check for {{ item }}" + command: "{{ item }} --version" + register: cmd_result + changed_when: false + failed_when: false + +- name: "Set fact about {{ item }}" + set_fact: "has_{{ item | replace('-', '_') }}={{ cmd_result.rc == 0 }}" |