From de25209d8bf5f149434b0f8a6e108d197e5daa6a Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Mon, 1 Jul 2024 09:25:28 +0200 Subject: [PATCH 1/5] Typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a2c0c2..02e5d67 100644 --- a/README.md +++ b/README.md @@ -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. From 19aedf8aa0bec48394147b083137d3111cc18aac Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Mon, 1 Jul 2024 15:39:08 +0200 Subject: [PATCH 2/5] Add community.general collection. --- requirements.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.yml b/requirements.yml index f9786d0..2747ef3 100644 --- a/requirements.yml +++ b/requirements.yml @@ -11,6 +11,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 From e8243b45e242e4461b1c171a144036dd49571197 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Mon, 1 Jul 2024 16:19:45 +0200 Subject: [PATCH 3/5] More honest. --- README.md | 5 ++--- meta/main.yml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 02e5d67..ccb30ca 100644 --- a/README.md +++ b/README.md @@ -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| +|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|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| +|[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 f8502f4..bb30429 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -15,7 +15,6 @@ galaxy_info: - buster - name: EL versions: - - "7" - "8" - "9" - name: Fedora From 7cdba459e8648f1c26b360b8a928601fb9f91ca1 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Mon, 1 Jul 2024 15:57:27 +0200 Subject: [PATCH 4/5] 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 From dca71d81feb51ca3dd35a3285695cc77d02dc819 Mon Sep 17 00:00:00 2001 From: Patrick Hasler Date: Thu, 11 Jul 2024 16:39:15 +0200 Subject: [PATCH 5/5] fix: jinja if statements job.conf.j2 --- templates/job.conf.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/job.conf.j2 b/templates/job.conf.j2 index 433e682..2eedc53 100644 --- a/templates/job.conf.j2 +++ b/templates/job.conf.j2 @@ -101,6 +101,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 %} @@ -118,8 +119,8 @@ {% if item.run_script.runs_when is defined %} Runs When = {{ item.run_script.runs_when }} {% endif %} - } {% endif %} + {% if item.run_before_job is defined %} RunBeforeJob = {{ item.run_before_job }} {% endif %}