Skip to content

Commit

Permalink
Merge pull request #11 from adfinis/fix/github_ci
Browse files Browse the repository at this point in the history
Update GitHub Actions
  • Loading branch information
adf-patrickha authored Jul 11, 2024
2 parents ad09b38 + 453e172 commit d18db34
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 33 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:
tag: "bullseye"
- image: "debian"
tag: "buster"
- image: "enterpriselinux"
tag: "7"
- image: "enterpriselinux"
tag: "8"
- image: "enterpriselinux"
Expand All @@ -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/[email protected]

- 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 }}
4 changes: 0 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ bareos_dir_tls_verify_peer: false
# A list of catalogs to configure.
bareos_dir_catalogs: []
# A list of consoled to configure.
# A list of consoles to configure.
bareos_dir_consoles: []
# A list of counters to configure.
Expand Down Expand Up @@ -390,10 +390,9 @@ This role has been tested on these [container images](https://hub.docker.com/u/r
|container|tags|
|---------|----|
|[Debian](https://hub.docker.com/r/robertdebock/debian)|buster, bullseye, bookworm|
|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|7, 8, 9|
|[Fedora](https://hub.docker.com/r/robertdebock/fedora/)|38,39|
|[opensuse](https://hub.docker.com/r/robertdebock/opensuse)|all|
|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|jammy, focal|
|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9|
|[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:
Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ bareos_dir_max_concurrent_jobs: 100
bareos_dir_message: Daemon

# Enable TLS.
bareos_dir_tls_enable: yes
bareos_dir_tls_enable: true

# Verify the peer.
bareos_dir_tls_verify_peer: no
bareos_dir_tls_verify_peer: false

# The path of the CA certificate file.
bareos_dir_tls_ca_cert_src: ""
Expand Down
6 changes: 2 additions & 4 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ galaxy_info:
- buster
- name: EL
versions:
- "7"
- "8"
- "9"
- all
- name: Fedora
versions:
- "37"
- "38"
- "39"
- name: opensuse
versions:
- all
Expand Down
6 changes: 3 additions & 3 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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.*
5 changes: 4 additions & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

roles:
- name: robertdebock.bootstrap
- name: adfinis.bareos_repository
Expand All @@ -11,6 +12,8 @@ roles:
# The `core_dependencies` and `postfix` roles provide mailing capabilities for the `bareos_role`: "dir".
# - name: robertdebock.core_dependencies
# - name: robertdebock.postfix

# use bconsole to be able to run better tests for Bareos Director
- name: adfinis.bareos_console
collections:
- name: community.general
- name: community.postgresql
7 changes: 3 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@
dest: bareos_dir_tls_cert_key_dest
when:
- bareos_dir_tls_enable
- bareos_dir_tls_enable
- bareos_dir_tls_ca_cert.src != ""
- bareos_dir_tls_cert.src != ""
- bareos_dir_tls_cert_key.src != ""
- bareos_dir_tls_ca_cert_src != ""
- bareos_dir_tls_cert_src != ""
- bareos_dir_tls_cert_key_src != ""

- name: Place bareos-dir.conf
ansible.builtin.template:
Expand Down
4 changes: 4 additions & 0 deletions templates/job.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
{% endif %}
{% if item.plugin_options is defined %}
Dir Plugin Options = {{ item.plugin_options }}
{% endif %}
{% if item.max_concurrent_copies is defined %}
Max Concurrent Copies = {{ item.max_concurrent_copies }}
{% endif %}
Expand Down Expand Up @@ -101,6 +102,7 @@
{% if item.virtual_full_backup_pool is defined %}
Virtual Full Backup Pool = {{ item.virtual_full_backup_pool }}
{% endif %}

{% if item.run_script is defined %}
Run Script {
{% if item.run_script.command is defined %}
Expand All @@ -120,6 +122,7 @@
{% endif %}
}
{% endif %}

{% if item.run_before_job is defined %}
RunBeforeJob = {{ item.run_before_job }}
{% endif %}
Expand Down Expand Up @@ -174,6 +177,7 @@
{% if item.prefer_mounted_volumes is defined %}
Prefer Mounted Volumes = {{ item.prefer_mounted_volumes | ternary('yes', 'no') }}
{% endif %}

}
{% else %}
# This file is not enabled.
Expand Down

0 comments on commit d18db34

Please sign in to comment.