From 005306ebb9242c72017bbd9c92aaf82ff1fcd8de Mon Sep 17 00:00:00 2001 From: willtome Date: Tue, 28 Jun 2022 14:30:47 -0400 Subject: [PATCH] add compliance --- ansible.cfg | 1 + linux/compliance.yml | 14 ++++++++++++++ roles/requirements.yml | 6 ++++++ 3 files changed, 21 insertions(+) create mode 100644 linux/compliance.yml create mode 100644 roles/requirements.yml diff --git a/ansible.cfg b/ansible.cfg index 469af5f..5bd4066 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,2 +1,3 @@ [defaults] collections_paths=./collections +roles_path=./roles diff --git a/linux/compliance.yml b/linux/compliance.yml new file mode 100644 index 0000000..865dab3 --- /dev/null +++ b/linux/compliance.yml @@ -0,0 +1,14 @@ +--- +- hosts: "{{ HOSTS }}" + become: true + vars: + compliance_profile: undef + + tasks: + - name: Check OS Type + assert: + that: "ansible_os_family == 'RedHat'" + + - name: Run Compliance Profile + include_role: + name: "redhatofficial.rhel{{ ansible_distribution_major_version }}_{{ compliance_profile }}" \ No newline at end of file diff --git a/roles/requirements.yml b/roles/requirements.yml new file mode 100644 index 0000000..2c4fd7b --- /dev/null +++ b/roles/requirements.yml @@ -0,0 +1,6 @@ +--- +roles: + - name: redhatofficial.rhel7_stig + version: 0.1.61 + - name: redhatofficial.rhel8_stig + version: 0.1.60