Closed jtruestedt closed 3 years ago
Very nice. Could you add the newly added molecule scenario to the ci actions scenario please?
Very nice. Could you add the newly added molecule scenario to the ci actions scenario please?
I added it without changing the current one - where it might be renamed to centos-scenario or something similar.
Thanks. The ubuntu tests now run as a step in CentOS job:
It might be better to have them as a separate job:
Can you make a small change and add ubuntu into the test matrix as another entry please?
molecule:
name: Molecule
runs-on: ubuntu-latest
strategy:
matrix:
distro: [centos7, centos8, ubuntu2004]
include:
- distro: centos7
command: molecule test
- distro: centos8
command: molecule test
- distro: ubuntu2004
command: molecule test -s ubuntu
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: 'theforeman.foreman_scap_client'
- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install test dependencies.
run: pip3 install -r requirements.txt
- name: Run Molecule tests.
run: ${{ matrix.command }}
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
sure - that is a lot better than the way I implemented it before
edit: why is there a centos8-scenario, if it also runs the centos7-docker-image? so as i can see the centos7 & centos8-scenario are running exactly the same with a centos7-image on ubuntu
Running centos7 image in centos8 job is a bug, https://github.com/theforeman/ansible-foreman_scap_client/pull/32 should fix it. Thanks!
I also forgot to update the meta/main.yml - there only EL 6 & 7 is listed - we could add Ubuntu 20, Debian 10, EL 8 there
That is no problem, we can do that in a follow-up PR.
Compared to the puppet-module, which already runs on Suse/Debian/Ubuntu the current version of the ansible-role only works with yum (CentOS/RHEL 7).
With minor changes it is possible to extend this to these other OSes - see Pull Request To provide also a test I added a second molecule scenario with Ubuntu20.04 because I did not want to change the current tests. To get it running on Ubuntu20.04 you can use the ATIX-repositories including the scap-client as well as the subscription-manager.
Furthermore I tested it on my infrastructure with SLES 15 SP2, Debian10, CentOS 7 and Ubuntu 20.04 - however without automatic tests.