Skip to content

Commit

Permalink
Merge pull request #17 from adfinis/molecule_workflow
Browse files Browse the repository at this point in the history
ci(molecule): use reusable workflow
adf-patrickha authored Jan 6, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents b774c60 + 1150fae commit 116dc27
Showing 2 changed files with 46 additions and 59 deletions.
88 changes: 35 additions & 53 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
@@ -11,57 +11,39 @@ on:
- cron: '3 2 2 * *'

jobs:
lint:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: ansible-lint
uses: ansible-community/ansible-lint-action@main
test:
needs:
- lint
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
config:
- image: "debian"
tag: "latest"
- image: "debian"
tag: "bullseye"
- image: "enterpriselinux"
tag: "latest"
- image: "fedora"
tag: "39"
- image: "fedora"
tag: "latest"
- image: "ubuntu"
tag: "jammy"
- image: "ubuntu"
tag: "latest"
steps:
- name: checkout
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: 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 }}
uses: adfinis/github-workflows-bareos/.github/workflows/[email protected]
with:
systems: |
{
"config": [
{
"image": "debian",
"tag": "latest"
},
{
"image": "debian",
"tag": "bullseye"
},
{
"image": "enterpriselinux",
"tag": "latest"
},
{
"image": "fedora",
"tag": "40"
},
{
"image": "fedora",
"tag": "latest"
},
{
"image": "ubuntu",
"tag": "jammy"
},
{
"image": "ubuntu",
"tag": "latest"
}
]
}
17 changes: 11 additions & 6 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
---

- name: Prepare
hosts: all
become: yes
gather_facts: no
become: true
gather_facts: false

roles:
- role: robertdebock.bootstrap
# The roles buildtools, python_pip and postgres are required.
# bareos-dir needs to connect to a database.
- role: robertdebock.buildtools
# EPEL is required for RHEL7.
- role: robertdebock.epel
- role: robertdebock.python_pip
- role: robertdebock.postgres
# The roles core_dependencies and postfix are required for the `bareos_role`: "dir".
# The roles core_dependencies and postfix are required for the `bareos_role`: "dir".
# bareos-dir needs to send emails.
# - role: robertdebock.core_dependencies
# - role: robertdebock.postfix

- name: Setup Bareos Repository
hosts: all
become: true
gather_facts: true
roles:
- role: adfinis.bareos_repository
bareos_repository_enable_tracebacks: yes
bareos_repository_enable_tracebacks: true

0 comments on commit 116dc27

Please sign in to comment.