aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/roles/common/tasks/tool.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-31 23:44:54 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-31 23:44:54 +0200
commit727ab17a644d52105746e18c301cf733b1181507 (patch)
tree71113c6efae3074899de965aee5489cb76362f8e /src/roles/common/tasks/tool.yml
parentdowngrade Ansible (diff)
downloadmaintenance-727ab17a644d52105746e18c301cf733b1181507.tar.gz
maintenance-727ab17a644d52105746e18c301cf733b1181507.zip
move Ansible files to src/
Diffstat (limited to 'src/roles/common/tasks/tool.yml')
-rw-r--r--src/roles/common/tasks/tool.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/roles/common/tasks/tool.yml b/src/roles/common/tasks/tool.yml
new file mode 100644
index 0000000..48d0acc
--- /dev/null
+++ b/src/roles/common/tasks/tool.yml
@@ -0,0 +1,8 @@
+- name: "Check for {{ item }}"
+ ansible.builtin.command: "{{ item }} --version"
+ register: cmd_result
+ changed_when: false
+ failed_when: false
+
+- name: "Set fact about {{ item }}"
+ ansible.builtin.set_fact: "has_{{ item | replace('-', '_') }}={{ cmd_result.rc == 0 }}"