--- # Copyright Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. - name: Ensure compliance folder exists ansible.builtin.file: path: "{{ cifmw_compliance_artifacts_basedir }}" state: directory recurse: true owner: "{{ ansible_user | default(lookup('env', 'USER')) }}" group: "{{ ansible_user | default(lookup('env', 'USER')) }}" mode: '755' - name: Install the compliance operator and plugin ansible.builtin.include_tasks: install.yml # Run compliance scans on the control plane - name: Run compliance scans and extract results ansible.builtin.include_tasks: run_suite_scan.yml loop: "{{ cifmw_compliance_suites }}" loop_control: loop_var: suite - name: Delete all resources created by the role ansible.builtin.include_tasks: cleanup.yml when: cifmw_compliance_cleanup | bool and not cifmw_compliance_dry_run | bool