From 44472d9069dec7e3183f2a17ce314840ba54d08e Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Tue, 2 Jul 2024 16:45:00 +0200 Subject: [PATCH] Make CI work on GitHub. --- .github/workflows/molecule.yml | 19 ++++++++++++------- .gitlab-ci.yml | 4 ---- README.md | 3 +-- meta/main.yml | 4 ---- molecule/default/molecule.yml | 2 +- requirements.txt | 6 +++--- 6 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index d098223..4bf704d 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -33,8 +33,6 @@ jobs: tag: "latest" - image: "amazonlinux" tag: "latest" - - image: "enterpriselinux" - tag: "8" - image: "enterpriselinux" tag: "latest" - image: "debian" @@ -47,8 +45,6 @@ jobs: tag: "latest" - image: "fedora" tag: "rawhide" - - image: "opensuse" - tag: "latest" - image: "ubuntu" tag: "latest" - image: "ubuntu" @@ -58,10 +54,19 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + + - name: Set up Python 3. + uses: actions/setup-python@v5 with: - path: "${{ github.repository }}" + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: molecule - uses: robertdebock/molecule-action@6.0.1 - with: + run: molecule converge + env: image: ${{ matrix.config.image }} tag: ${{ matrix.config.tag }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14b950a..f74f133 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,8 +16,6 @@ molecule: tag: "latest" - image: "amazonlinux" tag: "latest" - - image: "enterpriselinux" - tag: "8" - image: "enterpriselinux" tag: "latest" - image: "debian" @@ -30,8 +28,6 @@ molecule: tag: "latest" - image: "fedora" tag: "rawhide" - - image: "opensuse" - tag: "latest" - image: "ubuntu" tag: "latest" - image: "ubuntu" diff --git a/README.md b/README.md index 17de9f3..9157f3a 100644 --- a/README.md +++ b/README.md @@ -78,10 +78,9 @@ This role has been tested on these [container images](https://hub.docker.com/u/r |---------|----| |[Alpine](https://hub.docker.com/r/robertdebock/alpine)|all| |[Amazon](https://hub.docker.com/r/robertdebock/amazonlinux)|Candidate| -|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|8, 9| +|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9| |[Debian](https://hub.docker.com/r/robertdebock/debian)|all| |[Fedora](https://hub.docker.com/r/robertdebock/fedora)|all| -|[opensuse](https://hub.docker.com/r/robertdebock/opensuse)|all| |[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|all| The minimum version of Ansible required is 2.12, tests have been done to: diff --git a/meta/main.yml b/meta/main.yml index bbdcea1..5839bbc 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -16,7 +16,6 @@ galaxy_info: - Candidate - name: EL versions: - - "8" - "9" - name: Debian versions: @@ -24,9 +23,6 @@ galaxy_info: - name: Fedora versions: - all - - name: opensuse - versions: - - all - name: Ubuntu versions: - all diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 30c0aea..0a855eb 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -18,7 +18,7 @@ platforms: image: "${namespace:-robertdebock}/${image:-fedora}:${tag:-latest}" command: /sbin/init volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup:rw privileged: true pre_build_image: true provisioner: diff --git a/requirements.txt b/requirements.txt index 65b52f4..4d7adb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -ansible-compat == 4.* -molecule == 6.* +ansible-compat == 24.* +molecule == 24.* molecule-plugins[docker] == 23.* -ansible-lint == 6.* +ansible-lint == 24.* paramiko == 3.*