feat: Create role
This commit is contained in:
29
tasks/main.yml
Normal file
29
tasks/main.yml
Normal 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
|
Reference in New Issue
Block a user