Changeset - 72a32e8be299
[Not reviewed]
0 4 0
Branko Majic (branko) - 19 days ago 2024-08-30 20:12:36
branko@majic.rs
MAR-239: Dropped support for Debian 11 Bullseye from the web_server role.
4 files changed with 2 insertions and 42 deletions:
0 comments (0 inline, 0 general)
roles/web_server/defaults/main.yml
Show inline comments
 
@@ -14,16 +14,14 @@ ECDHE-RSA-AES128-GCM-SHA256:\
 
ECDHE-RSA-AES256-GCM-SHA384:\
 
ECDHE-RSA-CHACHA20-POLY1305:\
 
!aNULL:!MD5:!EXPORT"
 

	
 
# Internal parameters
 
php_fpm_service_name_per_release:
 
  bullseye: "php7.4-fpm"
 
  bookworm: "php8.2-fpm"
 

	
 
php_base_config_dir_per_release:
 
  bullseye: "/etc/php/7.4"
 
  bookworm: "/etc/php/8.2"
 

	
 
php_fpm_package_name: "php-fpm"
 
php_fpm_service_name: "{{ php_fpm_service_name_per_release[ansible_distribution_release] }}"
 
php_base_config_dir: "{{ php_base_config_dir_per_release[ansible_distribution_release] }}"
roles/web_server/molecule/default/molecule.yml
Show inline comments
 
@@ -23,42 +23,12 @@ platforms:
 
    interfaces:
 
      - auto_config: true
 
        ip: 192.168.56.11
 
        network_name: private_network
 
        type: static
 

	
 
  - name: parameters-mandatory-bullseye
 
    groups:
 
      - parameters-mandatory
 
      - bullseye
 
    box: debian/bullseye64
 
    memory: 512
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 
    interfaces:
 
      - auto_config: true
 
        ip: 192.168.56.31
 
        network_name: private_network
 
        type: static
 

	
 
  - name: parameters-optional-bullseye
 
    groups:
 
      - parameters-optional
 
      - bullseye
 
    box: debian/bullseye64
 
    memory: 512
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 
    interfaces:
 
      - auto_config: true
 
        ip: 192.168.56.32
 
        network_name: private_network
 
        type: static
 

	
 
  - name: parameters-mandatory-bookworm
 
    groups:
 
      - parameters-mandatory
 
      - bookworm
 
    box: debian/bookworm64
 
    memory: 512
roles/web_server/molecule/default/prepare.yml
Show inline comments
 
@@ -20,16 +20,12 @@
 
        argv:
 
          - "gimmecert"
 
          - "server"
 
          - "{{ item.name }}"
 
          - "{{ item.fqdn }}"
 
      with_items:
 
        - name: parameters-mandatory-bullseye_https
 
          fqdn: parameters-mandatory-bullseye
 
        - name: parameters-optional-bullseye_https
 
          fqdn: parameters-optional-bullseye
 
        - name: parameters-mandatory-bookworm_https
 
          fqdn: parameters-mandatory-bookworm
 
        - name: parameters-optional-bookworm_https
 
          fqdn: parameters-optional-bookworm
 

	
 
    - name: Set-up link to generated X.509 material
 
@@ -97,14 +93,12 @@
 
        owner: root
 
        group: root
 
        mode: 0644
 
        state: present
 
      with_dict:
 
        192.168.56.11: "client"
 
        192.168.56.31: "parameters-mandatory-bullseye"
 
        192.168.56.32: "parameters-optional-bullseye"
 
        192.168.56.21: "parameters-mandatory-bookworm"
 
        192.168.56.22: "parameters-optional-bookworm"
 

	
 
    - name: Install curl for testing redirects and webpage content
 
      apt:
 
        name: curl
roles/web_server/molecule/default/tests/conftest.py
Show inline comments
 
@@ -9,13 +9,13 @@ def php_info(host):
 
    Helper fixture used to define what the expected PHP-FPM package
 
    name, PHP-FPM service name, and PHP base configuration directory
 
    is based on Debian release.
 

	
 
    Currently supports:
 

	
 
    - Debian 11 (Bullseye)
 
    - Debian 12 (Bookworm)
 

	
 
    Resulting information can be accessed through returned named tuple
 
    with the following properties:
 

	
 
    - fpm_package (name of the PHP-FPM package)
 
    - fpm_service (name of the PHP-FPM system service)
 
@@ -24,14 +24,12 @@ def php_info(host):
 

	
 
    PHPInfo = namedtuple('PHPInfo', 'fpm_package fpm_service base_config_dir')
 

	
 
    ansible_facts = host.ansible("setup")["ansible_facts"]
 
    ansible_distribution_release = ansible_facts['ansible_distribution_release']
 

	
 
    if ansible_distribution_release == 'bullseye':
 
        info = PHPInfo(fpm_package='php-fpm', fpm_service='php7.4-fpm', base_config_dir='/etc/php/7.4')
 
    elif ansible_distribution_release == 'bookworm':
 
    if ansible_distribution_release == 'bookworm':
 
        info = PHPInfo(fpm_package='php-fpm', fpm_service='php8.2-fpm', base_config_dir='/etc/php/8.2')
 
    else:
 
        raise Exception('The php_info pytest fixture does not support Debian release: %s' % ansible_distribution_release)
 

	
 
    return info
0 comments (0 inline, 0 general)