diff --git a/.github/workflows/schedule_pg_debian10.yml b/.github/workflows/schedule_pg_debian10.yml deleted file mode 100644 index 486d3b3ac..000000000 --- a/.github/workflows/schedule_pg_debian10.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: scheduled PostgreSQL (Debian 10) - -on: - schedule: - - cron: "15 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: debian10 diff --git a/README.md b/README.md index a321799c5..0fac87751 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ It requires the installation of a consul in client mode on each application serv RedHat and Debian based distros (x86_64) ###### Supported Linux Distributions: -- **Debian**: 10, 11, 12 +- **Debian**: 11, 12 - **Ubuntu**: 20.04, 22.04, 24.04 - **CentOS Stream**: 9 - **Oracle Linux**: 8, 9 @@ -103,7 +103,6 @@ all supported PostgreSQL versions _Table of results of daily automated testing of cluster deployment:_ | Distribution | Test result | |--------------|:----------:| -| 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 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) | diff --git a/group_vars/all b/group_vars/all index 8c40914cd..743f6bc7c 100644 --- a/group_vars/all +++ b/group_vars/all @@ -17,4 +17,4 @@ os_minimum_versions: AlmaLinux: 8.3 OracleLinux: 8 Ubuntu: 20.04 - Debian: 10 + Debian: 11 diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index c98d42b52..a2de0bdbe 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -33,7 +33,7 @@ delegate_to: localhost run_once: true # noqa run-once - # Consul package for OracleLinux, Debian 10 (EOL) missing in HashiCorp repository + # Consul package for OracleLinux missing in HashiCorp repository # Only the installation of a binary file is supported - name: "Set variables: 'consul_install_from_repo: false' and 'patroni_installation_method: pip'" ansible.builtin.set_fact: @@ -41,8 +41,7 @@ patroni_installation_method: "pip" # the "rpm" method is supported only for consul installed from the repository when: - dcs_type == "consul" - - ansible_distribution == "OracleLinux" or - (ansible_distribution == "Debian" and ansible_distribution_major_version == '10') + - ansible_distribution == "OracleLinux" - name: Set variables for custom PostgreSQL data and WAL directory test ansible.builtin.set_fact: diff --git a/molecule/pg_upgrade/converge.yml b/molecule/pg_upgrade/converge.yml index 6f57f7295..f8c77b0e7 100644 --- a/molecule/pg_upgrade/converge.yml +++ b/molecule/pg_upgrade/converge.yml @@ -22,7 +22,7 @@ delegate_to: localhost run_once: true # noqa run-once - # Consul package for OracleLinux, Debian 10 (EOL) missing in HashiCorp repository + # Consul package for OracleLinux missing in HashiCorp repository # Only the installation of a binary file is supported - name: "Set variables: 'consul_install_from_repo: false' and 'patroni_installation_method: pip'" ansible.builtin.set_fact: @@ -30,8 +30,7 @@ patroni_installation_method: "pip" # the "rpm" method is supported only for consul installed from the repository when: - dcs_type == "consul" - - ansible_distribution == "OracleLinux" or - (ansible_distribution == "Debian" and ansible_distribution_major_version == '10') + - ansible_distribution == "OracleLinux" - name: Set variables for custom PostgreSQL data and WAL directory test ansible.builtin.set_fact: diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml index 69436f826..689846cea 100644 --- a/roles/haproxy/tasks/main.yml +++ b/roles/haproxy/tasks/main.yml @@ -8,97 +8,37 @@ when: hostvars[groups['postgres_cluster'][0]].ansible_hostname is not defined # Install HAProxy from rpm/deb packages -- block: - # RedHat - - name: Install HAProxy package - ansible.builtin.package: - name: haproxy - state: present - register: package_status - until: package_status is success - delay: 5 - retries: 3 + +# RedHat +- name: Install HAProxy package + ansible.builtin.package: + name: haproxy + state: present + register: package_status + until: package_status is success + delay: 5 + retries: 3 environment: "{{ proxy_env | default({}) }}" - when: ansible_os_family == "RedHat" and - installation_method == "repo" and - haproxy_installation_method == "rpm" + when: + - ansible_os_family == "RedHat" + - installation_method == "repo" + - haproxy_installation_method == "rpm" tags: haproxy, load_balancing -- block: - # Debian - - name: Add haproxy.debian.net repository apt-key - ansible.builtin.apt_key: - url: https://haproxy.debian.net/bernat.debian.org.gpg - state: present - when: haproxy_install_repo|bool and - (ansible_distribution == "Debian" and - ansible_distribution_major_version is version('10', '<=')) - - - name: Add haproxy.debian.net repository - ansible.builtin.apt_repository: - repo: "deb https://haproxy.debian.net {{ ansible_distribution_release }}-backports-1.8 main" - state: present - update_cache: true - when: haproxy_install_repo|bool and - (ansible_distribution == "Debian" and - ansible_distribution_major_version is version('10', '<=')) - - # Ubuntu - - name: Add ppa:vbernat/haproxy-1.8 repository apt-key - ansible.builtin.apt_key: # https://github.com/ansible/ansible/issues/31691 - data: | - -----BEGIN PGP PUBLIC KEY BLOCK----- - - xo0EUa70wAEEAMtI29s01PCX0JleVmh1QQr3rfPkfGo/GFKfcXRGE40nQHq+rWUh - 9slUN+kXBckSE0DDrnQH08Uvf12TJiHHFlbXnH5Ep+hgYPZGlVSpvBGO+c/CopU7 - RHMx9bl+pVOhrVeDWqLl2KqJI2wjJBLXA0dbRbCzmXPvrg3mBQ0hZ533ABEBAAHN - IExhdW5jaHBhZCBQUEEgZm9yIFZpbmNlbnQgQmVybmF0wrgEEwECACIFAlGu9MAC - GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEFBdl6QcYbnN8aMD/RM3InMu - bxTF9hzToCPF2EP37Q9WUQNF15f90jTOl8VqqpnUfGd2qlxUW31soCpDVxqX6lXf - qB0bI9EDz2r7w+goxBH+cRArJ2APdC7wE/U9eIxY49mzNsqjsl7zY+eoX4v4fjqk - 33hFyMMJDUtPxSRHWFqP5QNwCN+fbPh5GiyL - =ZiOf - -----END PGP PUBLIC KEY BLOCK----- - state: present - when: haproxy_install_repo|bool and - (ansible_distribution == 'Ubuntu' and - ansible_distribution_major_version is version('18', '<=')) - - - name: Add ppa:vbernat/haproxy-1.8 repository - ansible.builtin.apt_repository: - repo: "deb http://ppa.launchpad.net/vbernat/haproxy-1.8/ubuntu {{ ansible_distribution_release }} main" - state: present - update_cache: true - when: haproxy_install_repo|bool and - (ansible_distribution == 'Ubuntu' and - ansible_distribution_major_version is version('18', '<=')) - - - name: Install HAProxy v1.8 package - ansible.builtin.apt: - force_apt_get: true - name: "haproxy=1.8.*" - state: present - register: apt_status - until: apt_status is success - delay: 5 - retries: 3 - when: (ansible_distribution == "Debian" and ansible_distribution_major_version is version('10', '<=')) or - (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version('18', '<=')) - - - name: Install HAProxy package - ansible.builtin.apt: - name: haproxy - state: present - register: apt_status - until: apt_status is success - delay: 5 - retries: 3 - when: (ansible_distribution == "Debian" and ansible_distribution_major_version is version('11', '>=')) or - (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version('20', '>=')) +# Debian +- name: Install HAProxy package + ansible.builtin.apt: + name: haproxy + state: present + register: apt_status + until: apt_status is success + delay: 5 + retries: 3 environment: "{{ proxy_env | default({}) }}" - when: ansible_os_family == "Debian" and - installation_method == "repo" and - haproxy_installation_method == "deb" + when: + - ansible_os_family == "Debian" + - installation_method == "repo" + - haproxy_installation_method == "deb" tags: haproxy, load_balancing # from file (rpm/deb packages) diff --git a/vars/Debian.yml b/vars/Debian.yml index 15534b885..b2cbd62d7 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -26,16 +26,8 @@ apt_repository: # - repo: "deb https://deb.debian.org/debian/ {{ ansible_distribution_release }}-updates main" # debian repo (optional) # - repo: "deb https://security.debian.org/debian-security/ {{ ansible_distribution_release }}/updates main" # debian repo (optional) -# Packages (for apt repo) -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-20: [python3] # python 2 is not required - Ubuntu-22: [python3] # python 2 is not required - Ubuntu-24: [python3] # python 2 is not required +# Packages system_packages: - - "{{ os_specific_packages[ansible_distribution ~ '-' ~ ansible_distribution_major_version] }}" - python3 - python3-dev - python3-psycopg2 @@ -119,9 +111,6 @@ patroni_pip_package_repo: [] # if with_haproxy_load_balancing: true haproxy_installation_method: "deb" # "deb" (default) or "src" -haproxy_install_repo: true # or 'false' -# for Debian 10 the haproxy version 1.8 (LTS) will be installed from the haproxy.debian.net repository. -# you can preload the haproxy deb packages to your APT repository (in this case specify "haproxy_install_repo: false"). confd_package_repo: "https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-amd64" # if haproxy_installation_method: 'src' (optional)