Multi-profile compliance (#87)

Co-authored-by: willtome <wtome@redhat.com>
This commit is contained in:
Chris Edillon
2023-09-25 15:13:15 -04:00
committed by GitHub
parent 44585bf1b9
commit a5aa9564f5
7 changed files with 255 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
---
- name: Apply compliance profile
hosts: "{{ _hosts | default(omit) }}"
become: true
vars:
compliance_profile: undef
tasks:
- name: Check os type
ansible.builtin.assert:
that: "ansible_os_family == 'RedHat'"
- name: Run Compliance Profile
ansible.builtin.include_role:
name: "redhatofficial.rhel{{ ansible_distribution_major_version }}_{{ compliance_profile }}"
...