From 622807865f1615637f5f781418b36a90f667a0f5 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Tue, 2 Jul 2024 16:45:18 +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 aeffd31..69e790f 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -29,8 +29,6 @@ jobs: fail-fast: false matrix: config: - - image: "enterpriselinux" - tag: "8" - image: "enterpriselinux" tag: "latest" - image: "debian" @@ -43,8 +41,6 @@ jobs: tag: "latest" - image: "fedora" tag: "rawhide" - - image: "opensuse" - tag: "latest" - image: "ubuntu" tag: "latest" - image: "ubuntu" @@ -54,10 +50,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 816a247..313303d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,8 +12,6 @@ molecule: - if: $CI_COMMIT_REF_NAME == "master" parallel: matrix: - - image: "enterpriselinux" - tag: "8" - image: "enterpriselinux" tag: "latest" - image: "debian" @@ -26,8 +24,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 7a492c4..b62f57b 100644 --- a/README.md +++ b/README.md @@ -96,10 +96,9 @@ This role has been tested on these [container images](https://hub.docker.com/u/r |container|tags| |---------|----| -|[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 0e300d9..0f094b2 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -10,7 +10,6 @@ galaxy_info: platforms: - name: EL versions: - - "8" - "9" - name: Debian versions: @@ -18,9 +17,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 bc38ea0..62aa799 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.*