role_hcio/tasks/main.yml
2025-04-10 16:43:05 +02:00

30 lines
747 B
YAML

---
# tasks file for hcio
- name: Install prerequisites
ansible.builtin.apt:
name: "{{ hcio_prerequisites }}"
become: true
- name: Create directory to store scripts
ansible.builtin.file:
path: "{{ hcio_path }}"
state: directory
owner: root
group: root
mode: u=rwX,g=rX,o=
become: true
- name: Build the checks list
ansible.builtin.set_fact:
hcio_checks: "{{ hcio_checks + specific }}"
when: specific | length > 0
loop: "{{ lookup('ansible.builtin.varnames', '^hcio_checks_.+', wantlist=True) }}"
vars:
specific: "{{ lookup('ansible.builtin.vars', item, default='') }}"
- name: Import checks deployment tasks
ansible.builtin.include_tasks:
file: checks.yml
when: hcio_checks | length > 0