Skip to content

Commit

Permalink
Systemd issues with centos7 and debian container (#134)
Browse files Browse the repository at this point in the history
* change cgroups in container

* add cgroup volume

* remove centos7 from build

* fix #133 apt-key deprecation

* add build on ubuntu2204
  • Loading branch information
mkayontour authored Jan 24, 2023
1 parent c08eeff commit 9aa8f06
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 50 deletions.
48 changes: 3 additions & 45 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,6 @@ on:
- '!doc/**'

jobs:
build-ansible29:
runs-on: ubuntu-latest

env:
COLLECTION_NAMESPACE: icinga
COLLECTION_NAME: icinga

strategy:
# max-parallel: 4
matrix:
distro: [centos7]
python: ['3.8','3.10']
ansible: ['2.9.10']
scenario: [default]

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install dependencies ansible==2.9.10
run: |
python3 -m pip install --upgrade pip
python3 -m pip install 'ansible==${{ matrix.ansible }}'
python3 -m pip install -r requirements-test-2.9.0.txt
- name: Install collection
run: |
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
- name: Test with molecule
run: |
ansible --version
molecule --version
molecule --debug test -s ${{ matrix.scenario }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}

build-ansible210:
runs-on: ubuntu-latest

Expand All @@ -67,9 +24,10 @@ jobs:
COLLECTION_NAME: icinga

strategy:
# max-parallel: 4
fail-fast: false
max-parallel: 1
matrix:
distro: [centos7, debian11]
distro: [ubuntu2204]
python: ['3.8', '3.9', '3.10']
ansible: ['2.10.7', '2.11.8']
scenario: [default]
Expand Down
3 changes: 2 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ platforms:
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
pre_build_image: true
provisioner:
Expand Down
2 changes: 1 addition & 1 deletion requirements-test-2.10.7.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ansible-base==2.10.17
ansible-lint==5.4.0
molecule
molecule==4.0.3
molecule-docker
pytest-testinfra
2 changes: 1 addition & 1 deletion requirements-test-2.11.8.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ansible-core==2.11.8
ansible-lint
molecule
molecule==4.0.3
molecule-docker
pytest-testinfra
6 changes: 4 additions & 2 deletions roles/repos/tasks/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
- name: Apt - add repository key
become: yes
apt_key:
ansible.builtin.get_url:
url: "{{ icinga_repo_apt_key }}"
state: present
dest: /etc/apt/trusted.gpg.d/icinga.asc
mode: '0644'
force: true
- name: Apt - add Icinga repository (stable)
become: yes
apt_repository:
Expand Down

0 comments on commit 9aa8f06

Please sign in to comment.