feat: Create role

This commit is contained in:
2022-10-15 04:51:17 +02:00
committed by pulsar89.5
parent 079950f42f
commit 918c54bbc3
11 changed files with 267 additions and 4 deletions

29
tasks/main.yml Normal file
View File

@@ -0,0 +1,29 @@
---
# 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