Changeset - 4f29bd1aa05b
[Not reviewed]
1 4 0
Branko Majic (branko) - 9 months ago 2023-08-11 23:25:19
branko@majic.rs
MAR-181: Drop support for Debian 9 Stretch from the xmpp_server role:

- Switch to using IPs from VirtualBox default allowed host-only
network subnets.
- Drop Stretch-specific workarounds, code, and tests.
5 files changed with 9 insertions and 161 deletions:
0 comments (0 inline, 0 general)
roles/xmpp_server/molecule/default/host_vars/ldap-server.yml
Show inline comments
 
@@ -39,9 +39,6 @@ backup_host_ssh_private_keys:
 
  ed25519: "{{ lookup('file', 'tests/data/ssh/server_ed25519') }}"
 
  ecdsa: "{{ lookup('file', 'tests/data/ssh/server_ecdsa') }}"
 
backup_clients:
 
  - server: parameters-optional-stretch
 
    ip: 10.31.127.33
 
    public_key: "{{ lookup('file', 'tests/data/ssh/parameters-optional.pub') }}"
 
  - server: parameters-optional-buster
 
    ip: 10.31.127.31
 
    public_key: "{{ lookup('file', 'tests/data/ssh/parameters-optional.pub') }}"
roles/xmpp_server/molecule/default/molecule.yml
Show inline comments
 
@@ -15,51 +15,12 @@ lint:
 
platforms:
 

	
 
  - name: ldap-server
 
    box: debian/contrib-stretch64
 
    memory: 512
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.10
 
        network_name: private_network
 
        type: static
 

	
 
  - name: client-stretch
 
    groups:
 
      - clients
 
      - 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
 
    box: debian/contrib-buster64
 
    memory: 512
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.33
 
        ip: 192.168.56.10
 
        network_name: private_network
 
        type: static
 

	
 
@@ -72,7 +33,7 @@ platforms:
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.20
 
        ip: 192.168.56.20
 
        network_name: private_network
 
        type: static
 

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

	
 
@@ -98,7 +59,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/xmpp_server/molecule/default/prepare.yml
Show inline comments
 
@@ -22,21 +22,6 @@
 
        - name: ldap-server_ldap
 
          fqdn:
 
            - ldap-server
 
        - name: parameters-mandatory-stretch64_xmpp
 
          fqdn:
 
            - parameters-mandatory
 
            - domain1
 
            - proxy.domain1
 
            - conference.domain1
 
        - name: parameters-optional-stretch64_xmpp
 
          fqdn:
 
            - parameters-optional
 
            - domain2
 
            - proxy.domain2
 
            - conference.domain2
 
            - domain3
 
            - proxy.domain3
 
            - conference.domain3
 
        - name: parameters-mandatory-buster64_xmpp
 
          fqdn:
 
            - parameters-mandatory
 
@@ -90,25 +75,6 @@
 
        regexp: "host\\.name\\)"
 
        replace: "host.targetname)"
 

	
 
- 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.10: "ldap-server backup-server"
 
        10.31.127.21: "client-stretch"
 
        10.31.127.32: "parameters-mandatory domain1 proxy.domain1 conference.domain1"
 
        10.31.127.33: "parameters-optional domain2 proxy.domain2 conference.domain2 domain3 proxy.domain3 conference.domain3"
 

	
 
- hosts: buster
 
  become: true
 
  tasks:
 
@@ -123,10 +89,10 @@
 
        mode: 0644
 
        state: present
 
      with_dict:
 
        10.31.127.10: "ldap-server backup-server"
 
        10.31.127.20: "client-stretch"
 
        10.31.127.30: "parameters-mandatory domain1 proxy.domain1 conference.domain1"
 
        10.31.127.31: "parameters-optional domain2 proxy.domain2 conference.domain2 domain3 proxy.domain3 conference.domain3"
 
        192.168.56.10: "ldap-server backup-server"
 
        192.168.56.20: "client-buster"
 
        192.168.56.30: "parameters-mandatory domain1 proxy.domain1 conference.domain1"
 
        192.168.56.31: "parameters-optional domain2 proxy.domain2 conference.domain2 domain3 proxy.domain3 conference.domain3"
 

	
 
    - name: Enable TLSv1.0+ in global OpenSSL configuration file in order to be able to test the xmpp_server_tls_protocol parameter
 
      lineinfile:
 
@@ -138,14 +104,6 @@
 
        mode: 0644
 
        state: present
 

	
 
    - name: Deploy lua-ldap package pin for testing Stretch -> Buster upgrade scenario (no need to pin the package in Buster)
 
      copy:
 
        src: "lua_ldap_backports_pin"
 
        dest: "/etc/apt/preferences.d/lua-ldap"
 
        owner: root
 
        group: root
 
        mode: 0644
 

	
 
- hosts: clients
 
  become: true
 
  tasks:
roles/xmpp_server/molecule/default/tests/test_default_stretch.py
Show inline comments
 
deleted file
roles/xmpp_server/tasks/main.yml
Show inline comments
 
@@ -4,29 +4,6 @@
 
  apt:
 
    name: python-apt
 

	
 
- name: Add Debian backports repository for Debian Stretch
 
  apt_repository:
 
    repo: "deb http://ftp.debian.org/debian {{ ansible_distribution_release }}-backports main"
 
    filename: "backports"
 
    state: present
 
    mode: 0644
 
  when: "ansible_distribution_release == 'stretch'"
 

	
 
- name: Pin the lua-ldap package to backports repository for Debian Stretch
 
  template:
 
    src: "lua_ldap_backports_pin.j2"
 
    dest: "/etc/apt/preferences.d/lua-ldap"
 
    owner: root
 
    group: root
 
    mode: 0644
 
  when: "ansible_distribution_release == 'stretch'"
 

	
 
- name: Drop the Pin lua-ldap package (if machine was upgraded from Debian Stretch)
 
  file:
 
    path: "/etc/apt/preferences.d/lua-ldap"
 
    state: absent
 
  when: "ansible_distribution_release != 'stretch'"
 

	
 
- name: Add Prosody repository apt key
 
  apt_key:
 
    data: "{{ lookup('file', 'prosody-debian-gpg-key.asc') }}"
0 comments (0 inline, 0 general)