4
0
Fork 0

Initial molecule thanks to @bbaassssiiee in rh8

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2023-03-20 15:15:49 +00:00
parent 30abc4b9d0
commit dadbeaa84e
No known key found for this signature in database
GPG key ID: 1DE02A772D0908F9
9 changed files with 205 additions and 0 deletions

View file

@ -0,0 +1,27 @@
---
# This is a playbook to test the tasks.
- name: Converge
hosts: all
gather_facts: true
vars:
role_name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
ansible_user: root
system_is_container: true
rhel9cis_selinux_disable: true
rhel9cis_rule_5_3_4: false
rhel9cis_rule_1_1_10: false
rhel9cis_firewall: "none"
rhel9cis_rule_4_1_1_1: false
rhel9cis_rule_4_1_1_2: false
rhel9cis_rule_4_1_1_3: false
rhel9cis_rule_4_1_1_4: false
rhel9cis_rule_4_2_1_2: false
rhel9cis_rule_4_2_1_4: false
rhel9cis_rule_5_1_1: false
pre_tasks:
tasks:
- name: "Include tasks"
ansible.builtin.include_role:
name: "{{ role_name }}"

View file

@ -0,0 +1,34 @@
---
# Molecule configuration
# https://molecule.readthedocs.io/en/latest/
driver:
name: docker
platforms:
- name: ubi9
image: registry.access.redhat.com/ubi9/ubi-init
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
command: "/usr/sbin/init"
capabilities:
- SYS_ADMIN
provisioner:
name: ansible
config_options:
defaults:
interpreter_python: auto_silent
callbacks_enabled: profile_tasks, timer
lint: |
set -e
yamllint .
ansible-lint
flake8
verifier:
name: ansible

View file

@ -0,0 +1,13 @@
---
- name: Verify
hosts: all
gather_facts: false
vars:
role_name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
tasks:
- name: "Include verify tasks"
ansible.builtin.include_role:
name: "{{ role_name }}"
tasks_from: verify