Skip to content

Commit

Permalink
Merge pull request ANXS#522 from gclough/fix_ci_pipeline
Browse files Browse the repository at this point in the history
fix: Fix CI pipeline
  • Loading branch information
gclough authored Dec 3, 2021
2 parents a3a7fed + fd47ceb commit 63a2232
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ jobs:
include:
- distro: centos7
- distro: centos8
- distro: ubuntu1604
- distro: ubuntu1804
- distro: ubuntu2004
- distro: debian9
- distro: debian10
- distro: fedora33
- distro: ubuntu1604
- distro: ubuntu1804
- distro: ubuntu2004

steps:
- name: Check out the codebase.
Expand Down
26 changes: 11 additions & 15 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
galaxy_info:
author: pjan vandaele
company: ANXS
namespace: anxs
role_name: postgresql
description: "Install and configure PostgreSQL, dependencies, extensions, databases and users."
min_ansible_version: 2.4.0
Expand All @@ -12,27 +13,22 @@ galaxy_info:
- name: Debian
versions:
- stretch
## - buster
- buster

- name: EL
versions:
- 7
## - 8
- 8

#
# DISABLED
#
# - name: Ubuntu
# versions:
# - bionic
# ## - focal
- name: Ubuntu
versions:
- bionic
- focal
- xenial

#
# DISABLED
#
# - name: Fedora
# versions:
# - 27
- name: Fedora
versions:
- 33

galaxy_tags:
- postgresql
Expand Down
24 changes: 12 additions & 12 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,16 @@
notify: restart postgresql

- block:
- name: PostgreSQL | Check if cluster is running
command: "pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} status"
ignore_errors: true
register: postgresql_cluster_running

- name: PostgreSQL | Reload cluster
command: "pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} reload"
when: postgresql_cluster_running.rc == 0

- name: PostgreSQL | Start cluster
command: "pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} start"
when: postgresql_cluster_running.rc != 0
- name: PostgreSQL | Ensure PostgreSQL is running
service:
name: "{{ postgresql_service_name }}"
state: started
register: postgresql_cold_started

- name: PostgreSQL | Reload PostgreSQL configuration
service:
name: "{{ postgresql_service_name }}"
state: reloaded
register: postgresql_reloaded
when: not postgresql_cold_started.changed
when: postgresql_configuration_pt1.changed or postgresql_configuration_pt2.changed or postgresql_configuration_pt3.changed or postgresql_systemd_custom_conf.changed

0 comments on commit 63a2232

Please sign in to comment.