From 7cdba459e8648f1c26b360b8a928601fb9f91ca1 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Mon, 1 Jul 2024 15:57:27 +0200 Subject: [PATCH] Make GitHub CI work. --- .github/workflows/molecule.yml | 23 ++++++++++++++++------- .gitlab-ci.yml | 4 ---- README.md | 2 +- meta/main.yml | 5 ++--- molecule/default/molecule.yml | 6 +++--- requirements.txt | 6 +++--- requirements.yml | 1 + 7 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index de0f207..9542456 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -32,8 +32,6 @@ jobs: tag: "bullseye" - image: "debian" tag: "buster" - - image: "enterpriselinux" - tag: "7" - image: "enterpriselinux" tag: "8" - image: "enterpriselinux" @@ -54,15 +52,26 @@ jobs: tag: "focal" steps: - name: checkout - uses: actions/checkout@v3 - with: - path: "${{ github.repository }}" + uses: actions/checkout@v4 + - name: disable apparmor for mysql run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: molecule - uses: robertdebock/molecule-action@6.0.0 + + - name: Set up Python 3. + uses: actions/setup-python@v5 with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: molecule + run: molecule converge + env: image: ${{ matrix.config.image }} tag: ${{ matrix.config.tag }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 679c2d2..8265e3a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,14 +18,10 @@ molecule: tag: "bullseye" - image: "debian" tag: "buster" - - image: "enterpriselinux" - tag: "7" - image: "enterpriselinux" tag: "8" - image: "enterpriselinux" tag: "latest" - - image: "fedora" - tag: "37" - image: "fedora" tag: "38" - image: "opensuse" diff --git a/README.md b/README.md index ccb30ca..8e0061c 100644 --- a/README.md +++ b/README.md @@ -391,7 +391,7 @@ This role has been tested on these [container images](https://hub.docker.com/u/r |---------|----| |[Debian](https://hub.docker.com/r/robertdebock/debian)|buster, bullseye, bookworm| |[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9| -|[Fedora](https://hub.docker.com/r/robertdebock/fedora/)|38,39| +|[Fedora](https://hub.docker.com/r/robertdebock/fedora)|38, 39| |[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|jammy| 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 bb30429..83cdb16 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -15,12 +15,11 @@ galaxy_info: - buster - name: EL versions: - - "8" - - "9" + - all - name: Fedora versions: - - "37" - "38" + - "39" - name: opensuse versions: - all diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 60bd088..bc4f2cf 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -18,9 +18,9 @@ platforms: image: "${namespace:-robertdebock}/${image:-fedora}:${tag:-latest}" command: /sbin/init volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro - privileged: yes - pre_build_image: yes + - /sys/fs/cgroup:/sys/fs/cgroup:rw + privileged: true + pre_build_image: true provisioner: name: ansible verifier: diff --git a/requirements.txt b/requirements.txt index 76ee97c..79d6320 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # Pinning ansible-compat version due to [bug](https://github.com/ansible-community/molecule/issues/3903) -ansible-compat == 4.* -molecule == 6.* +ansible-compat == 24.* +molecule == 24.* molecule-plugins == 23.* docker == 7.* -ansible-lint == 6.* +ansible-lint == 24.* paramiko == 3.* diff --git a/requirements.yml b/requirements.yml index 2747ef3..01d0fb4 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,4 +1,5 @@ --- + roles: - name: robertdebock.bootstrap - name: adfinis.bareos_repository