Changeset - 951070e5575b
[Not reviewed]
0 6 0
Branko Majic (branko) - 9 months ago 2023-08-10 23:56:05
branko@majic.rs
MAR-181: Drop support for Debian 9 Stretch from web_server role:

- Switch to using IPs from VirtualBox default allowed host-only
network subnets.
- Drop Stretch-specific code and tests.
6 files changed with 7 insertions and 80 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -1472,7 +1472,6 @@ Distribution compatibility
 

	
 
Role is compatible with the following distributions:
 

	
 
- Debian 9 (Stretch)
 
- Debian 10 (Buster)
 

	
 

	
roles/web_server/defaults/main.yml
Show inline comments
 
@@ -15,11 +15,9 @@ ECDHE-RSA-CHACHA20-POLY1305:\
 

	
 
# Internal parameters
 
php_fpm_service_name_per_release:
 
  stretch: "php7.0-fpm"
 
  buster: "php7.3-fpm"
 

	
 
php_base_config_dir_per_release:
 
  stretch: "/etc/php/7.0"
 
  buster: "/etc/php/7.3"
 

	
 
php_fpm_package_name: "php-fpm"
roles/web_server/meta/main.yml
Show inline comments
 
@@ -11,5 +11,4 @@ galaxy_info:
 
  platforms:
 
    - name: Debian
 
      versions:
 
        - 9
 
        - 10
roles/web_server/molecule/default/molecule.yml
Show inline comments
 
@@ -14,45 +14,6 @@ lint:
 

	
 
platforms:
 

	
 
  - name: client1-stretch
 
    groups:
 
      - client
 
      - stretch
 
    box: debian/contrib-stretch64
 
    memory: 256
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.21
 
        network_name: private_network
 
        type: static
 

	
 
  - name: parameters-mandatory-stretch64
 
    groups:
 
      - parameters-mandatory
 
      - stretch
 
    box: debian/contrib-stretch64
 
    memory: 512
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.32
 
        network_name: private_network
 
        type: static
 

	
 
  - name: parameters-optional-stretch64
 
    groups:
 
      - parameters-optional
 
      - stretch
 
    box: debian/contrib-stretch64
 
    memory: 512
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.33
 
        network_name: private_network
 
        type: static
 

	
 
  - name: client1-buster
 
    groups:
 
      - client
 
@@ -62,7 +23,7 @@ platforms:
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.20
 
        ip: 192.168.56.20
 
        network_name: private_network
 
        type: static
 

	
 
@@ -75,7 +36,7 @@ platforms:
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.30
 
        ip: 192.168.56.30
 
        network_name: private_network
 
        type: static
 

	
 
@@ -88,7 +49,7 @@ platforms:
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.31
 
        ip: 192.168.56.31
 
        network_name: private_network
 
        type: static
 

	
roles/web_server/molecule/default/prepare.yml
Show inline comments
 
@@ -23,10 +23,6 @@
 
          - "{{ item.name }}"
 
          - "{{ item.fqdn }}"
 
      with_items:
 
        - name: parameters-mandatory-stretch64_https
 
          fqdn: parameters-mandatory
 
        - name: parameters-optional-stretch64_https
 
          fqdn: parameters-optional
 
        - name: parameters-mandatory-buster64_https
 
          fqdn: parameters-mandatory
 
        - name: parameters-optional-buster64_https
 
@@ -63,29 +59,6 @@
 
          - nmap
 
        state: present
 

	
 
- hosts: stretch
 
  become: true
 
  tasks:
 

	
 
    - name: Set-up the hosts file
 
      lineinfile:
 
        path: /etc/hosts
 
        regexp: "^{{ item.key }}"
 
        line: "{{ item.key }} {{ item.value }}"
 
        owner: root
 
        group: root
 
        mode: 0644
 
        state: present
 
      with_dict:
 
        10.31.127.21: "client1"
 
        10.31.127.32: "parameters-mandatory"
 
        10.31.127.33: "parameters-optional"
 

	
 
    - name: Install curl for testing redirects and webpage content
 
      apt:
 
        name: curl
 
        state: present
 

	
 
- hosts: buster
 
  become: true
 
  tasks:
 
@@ -100,9 +73,9 @@
 
        mode: 0644
 
        state: present
 
      with_dict:
 
        10.31.127.20: "client1"
 
        10.31.127.30: "parameters-mandatory"
 
        10.31.127.31: "parameters-optional"
 
        192.168.56.20: "client1"
 
        192.168.56.30: "parameters-mandatory"
 
        192.168.56.31: "parameters-optional"
 

	
 
    - name: Install curl for testing redirects and webpage content
 
      apt:
roles/web_server/molecule/default/tests/conftest.py
Show inline comments
 
@@ -12,7 +12,6 @@ def php_info(host):
 

	
 
    Currently supports:
 

	
 
    - Debian 9 (Stretch)
 
    - Debian 10 (Buster)
 

	
 
    Resulting information can be accessed through returned named tuple
 
@@ -28,9 +27,7 @@ def php_info(host):
 
    ansible_facts = host.ansible("setup")["ansible_facts"]
 
    ansible_distribution_release = ansible_facts['ansible_distribution_release']
 

	
 
    if ansible_distribution_release == 'stretch':
 
        info = PHPInfo(fpm_package='php-fpm', fpm_service='php7.0-fpm', base_config_dir='/etc/php/7.0')
 
    elif ansible_distribution_release == 'buster':
 
    if ansible_distribution_release == 'buster':
 
        info = PHPInfo(fpm_package='php-fpm', fpm_service='php7.3-fpm', base_config_dir='/etc/php/7.3')
 
    else:
 
        raise Exception('The php_info pytest fixture does not support Debian release: %s' % ansible_distribution_release)
0 comments (0 inline, 0 general)