diff --git a/.config/python/dev/requirements.txt b/.config/python/dev/requirements.txt index 62d4c1f0f..31a7dab04 100644 --- a/.config/python/dev/requirements.txt +++ b/.config/python/dev/requirements.txt @@ -43,7 +43,7 @@ six==1.16.0 subprocess-tee==0.4.1 text-unidecode==1.3 tomli==2.0.1 -urllib3==1.26.17 +urllib3==1.26.18 wcmatch==8.4.1 websocket-client==1.5.2 yamllint==1.31.0 \ No newline at end of file diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index fb1c55180..609200d53 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -31,9 +31,6 @@ jobs: - distro: ubuntu2004 tag: latest namespace: geerlingguy - - distro: ubuntu1804 - tag: latest - namespace: geerlingguy - distro: rockylinux8 tag: latest namespace: geerlingguy diff --git a/.github/workflows/molecule_pgpro.yml b/.github/workflows/molecule_pgpro.yml index bcc07ec13..07c4e093c 100644 --- a/.github/workflows/molecule_pgpro.yml +++ b/.github/workflows/molecule_pgpro.yml @@ -15,7 +15,6 @@ jobs: - centos8 - debian10 - debian11 - - ubuntu1804 - ubuntu2004 - ubuntu2204 diff --git a/.github/workflows/schedule_pg_ubuntu1804.yml b/.github/workflows/schedule_pg_ubuntu1804.yml deleted file mode 100644 index 46d745ee7..000000000 --- a/.github/workflows/schedule_pg_ubuntu1804.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: scheduled PostgreSQL (Ubuntu 18.04) - -on: - schedule: - - cron: "30 0 * * *" - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Set TERM environment variable - run: echo "TERM=xterm" >> $GITHUB_ENV - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install dependencies - run: make bootstrap-dev - - - name: Run Molecule tests - run: make molecule-test - env: - PY_COLORS: "1" - ANSIBLE_FORCE_COLOR: "1" - IMAGE_DISTRO: ubuntu1804 diff --git a/README.md b/README.md index e78b93ed9..8372ee8f8 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,6 @@ _Table of results of daily automated testing of cluster deployment:_ | Debian 10 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_debian10.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_debian10.yml) | | Debian 11 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_debian11.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_debian11.yml) | | Debian 12 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_debian11.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_debian12.yml) | -| Ubuntu 18.04 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_ubuntu1804.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_ubuntu1804.yml) | | Ubuntu 20.04 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_ubuntu2004.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_ubuntu2004.yml) | | Ubuntu 22.04 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_ubuntu2204.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_ubuntu2204.yml) | | CentOS Stream 8 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_centosstream8.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_centosstream8.yml) | diff --git a/group_vars/all b/group_vars/all index 4b558d62b..2398199e3 100644 --- a/group_vars/all +++ b/group_vars/all @@ -15,6 +15,6 @@ os_minimum_versions: CentOS: 7 Rocky: 8.4 OracleLinux: 7 - Ubuntu: 18.04 + Ubuntu: 20.04 Debian: 10 AlmaLinux: 8.3 diff --git a/roles/patroni/templates/patroni.yml.j2 b/roles/patroni/templates/patroni.yml.j2 index 295a6032b..efe5fdd33 100644 --- a/roles/patroni/templates/patroni.yml.j2 +++ b/roles/patroni/templates/patroni.yml.j2 @@ -35,7 +35,8 @@ etcd3: {% endif %} {% if dcs_exists|bool and dcs_type == 'etcd' %} etcd3: - hosts: {% for etcd_hosts in patroni_etcd_hosts %}{{etcd_hosts.host}}:{{etcd_hosts.port}}{% if not loop.last %},{% endif %}{% endfor +%} + hosts: {% for etcd_hosts in patroni_etcd_hosts %}{{etcd_hosts.host}}:{{etcd_hosts.port}}{% if not loop.last %},{% endif %}{% endfor %} + {% if patroni_etcd_username | default('') | length > 0 %} username: {{ patroni_etcd_username | default('') }} {% endif %} diff --git a/roles/pgbouncer/config/tasks/main.yml b/roles/pgbouncer/config/tasks/main.yml index 7ac53e645..c34e97a68 100644 --- a/roles/pgbouncer/config/tasks/main.yml +++ b/roles/pgbouncer/config/tasks/main.yml @@ -30,7 +30,7 @@ become: true become_user: postgres ansible.builtin.command: >- - {{ postgresql_bin_dir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXcq + {{ postgresql_bin_dir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc "SELECT concat('\"', usename, '\" \"', passwd, '\"') FROM pg_shadow where usename != '{{ patroni_replication_username }}'" register: pg_shadow_result changed_when: false diff --git a/vars/Debian.yml b/vars/Debian.yml index 8c47c45f7..3a3952945 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -31,7 +31,6 @@ os_specific_packages: Debian-10: [python, python-dev, python-psycopg2, python-setuptools] Debian-11: [python3] # python 2 is not required Debian-12: [python3] # python 2 is not required - Ubuntu-18: [python, python-dev, python-psycopg2, python-setuptools] Ubuntu-20: [python3] # python 2 is not required Ubuntu-22: [python3] # python 2 is not required system_packages: diff --git a/vars/main.yml b/vars/main.yml index 46198ea5c..d116a46bf 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -15,7 +15,7 @@ vip_interface: "{{ ansible_default_ipv4.interface }}" # interface name (e.g., " # - For the "Type B" scheme: Use libpq `target_session_attrs`, ensuring read/write connections go to the primary database, as an alternative to cluster_vip. patroni_cluster_name: "postgres-cluster" # the cluster name (must be unique for each cluster) -patroni_install_version: "3.1.0" # or 'latest' +patroni_install_version: "3.2.0" # or 'latest' patroni_superuser_username: "postgres" patroni_superuser_password: "postgres-pass" # please change password