Files
home-cluster/bootstrap/tasks/validation/cli.yaml
T
2024-01-19 05:36:25 -05:00

27 lines
909 B
YAML

---
- name: Check if required CLI tools are present
ansible.builtin.shell: command -v {{ item }} >/dev/null 2>&1
loop: ["age", "cloudflared", "flux", "sops", "jq", "kubeconform", "kustomize"]
changed_when: false
check_mode: false
register: result
failed_when: result.rc != 0 and result.rc != 127
- name: Check if required CLI tools are present for k0s
when: bootstrap_distribution == "k0s"
ansible.builtin.shell: command -v {{ item }} >/dev/null 2>&1
loop: ["k0sctl"]
changed_when: false
check_mode: false
register: result
failed_when: result.rc != 0 and result.rc != 127
- name: Check if required CLI tools are present for talos
when: bootstrap_distribution == "talos"
ansible.builtin.shell: command -v {{ item }} >/dev/null 2>&1
loop: ["talhelper", "talosctl"]
changed_when: false
check_mode: false
register: result
failed_when: result.rc != 0 and result.rc != 127