Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:

list-scenarios:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.listscenarios.outputs.scenarios }}
steps:
Expand All @@ -22,21 +22,21 @@ jobs:
name: Test
needs:
- list-scenarios
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
# Keep running so we can see if other tests pass
fail-fast: false
matrix:
scenario: ${{fromJson(needs.list-scenarios.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.12'
- name: Install Ansible & Molecule
run: |
pip install "ansible<8" "ansible-lint<6.13" flake8
pip install "molecule<5" "ansible-compat<4"
pip install "requests" "ansible" "ansible-lint" "flake8"
pip install "molecule" "ansible-compat"
pip install molecule-plugins[docker] pytest-testinfra
- name: Run molecule
run: molecule test -s "${{ matrix.scenario }}"
Expand All @@ -46,17 +46,10 @@ jobs:
if: startsWith(github.ref, 'refs/tags')
needs:
- test
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Read the role name
id: role-name
run: |
name=$(grep 'role_name' meta/main.yml | sed -r 's/^[^:]*:(.*)$/\1/' | tr -d '[:space:]') # noqa
echo "rolename=$name" >> "$GITHUB_OUTPUT"
- name: Publish to Galaxy
uses: ome/action-ansible-galaxy-publish@main
- name: galaxy
uses: ansible-actions/ansible-galaxy-action@v1.2.0
with:
galaxy-api-key: ${{ secrets.GALAXY_API_KEY }}
galaxy-version: ${{ github.ref_name }}
role-name: ${{ steps.role-name.outputs.rolename }}
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
galaxy_version: ${{ github.ref_name }}
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
description: Setup a cron job for regular full PostgreSQL database dumps
company: Open Microscopy Environment
license: BSD
min_ansible_version: 2.3
min_ansible_version: 2.11
platforms:
- name: EL
versions:
Expand Down
3 changes: 1 addition & 2 deletions molecule/default/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
- name: Install cron
become: true
ansible.builtin.dnf:
update_cache: true
name: cronie
state: present

roles:

- role: ome.postgresql
postgresql_version: "13"
postgresql_version: "16"

- role: ome.postgresql_backup
postgresql_backup_dir: /backup/postgresql
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

- name: postgresql backup | create backup directory
become: true
file:
ansible.builtin.file:
path: "{{ postgresql_backup_dir }}"
state: directory
owner: postgres
mode: 0700

- name: postgresql backup | create cron job
become: true
template:
ansible.builtin.template:
src: etc-crond-postgresql-backup.j2
dest: /etc/cron.{{ postgresql_backup_frequency }}/postgresql-backup
mode: 0755