From 7ecf20bfbded600e7923a9a2f0b2498e7c8fb092 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Mon, 1 Jul 2024 15:25:06 +0200 Subject: [PATCH] Making molecule on GitHub work again. --- .github/workflows/molecule.yml | 19 ++++++++++++------- .gitlab-ci.yml | 4 ---- README.md | 3 +-- meta/main.yml | 6 +----- molecule/default/molecule.yml | 2 +- requirements.txt | 6 +++--- requirements.yml | 1 - 7 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 7f94364..7f178df 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 f92bb09..248f00e 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,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)|all| |[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 8a4d00c..b20a24b 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -16,17 +16,13 @@ galaxy_info: - Candidate - name: EL versions: - - "8" - - "9" + - all - name: Debian versions: - all - 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 8404b81..7ac718a 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.* diff --git a/requirements.yml b/requirements.yml index 4aca381..11e3224 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,4 +1,3 @@ --- roles: - name: robertdebock.bootstrap -collections: