try docker for inspec-auditor

Signed-off-by: Martin Schurz <[email protected]>
This commit is contained in:
Martin Schurz committed 2023-04-10 23:04:46 +02:00
1 parent ebab98930c
commit 4a9d6033eb
1 file changed
+2 -28
+2 -28
View File
@@ -1,44 +1,18 @@
---
- name: Verify
hosts: all
become: true
hosts: localhost
environment:
http_proxy: "{{ lookup('env', 'http_proxy') | default(omit) }}"
https_proxy: "{{ lookup('env', 'https_proxy') | default(omit) }}"
no_proxy: "{{ lookup('env', 'no_proxy') | default(omit) }}"
roles:
- geerlingguy.git
tasks:
- name: install fake SuSE-release for cinc compatibility
copy:
content: |
openSUSE Faked Enterprise 2020 (x86_64)
VERSION = 2020
CODENAME = Faked Feature
dest: /etc/SuSE-release
owner: root
group: root
mode: '0444'
when: ansible_facts.os_family == 'Suse'
- name: install git for SuSE since geerlinguy.git does not support it
zypper:
name: git
state: present
when: ansible_facts.os_family == 'Suse'
- name: install crypto compat modules on fedora
dnf:
name: libxcrypt-compat
when: ansible_facts.distribution == 'Fedora'
- name: Execute cinc-auditor tests
command: >
docker run
--volume /run/docker.sock:/run/docker.sock
docker.io/cincproject/auditor exec
-t docker://instance
--sudo --no-show-progress --no-color
--no-show-progress --no-color
--no-distinct-exit https://github.com/dev-sec/ssh-baseline/archive/refs/heads/master.zip
register: test_results
changed_when: false