Changeset - eb6d9c7d6651
[Not reviewed]
0 7 0
Branko Majic (branko) - 4 years ago 2020-11-10 22:20:27
branko@majic.rs
MAR-171: Make the xmpp_domains parameter mandatory:

- Updated release notes.
- Updated role reference documentation.
- Dropped the default value for parameter from the xmpp_server role.
- Updated tests.
7 files changed with 11 insertions and 9 deletions:
0 comments (0 inline, 0 general)
docs/releasenotes.rst
Show inline comments
 
@@ -90,6 +90,8 @@ Breaking changes:
 

	
 
* ``xmpp_server`` role
 

	
 
  * Parameter ``xmpp_domains`` is now mandatory.
 

	
 
  * Use 2048-bit Diffie-Hellman parameters for relevant TLS
 
    ciphers. This could introduce incompatibility with older
 
    clients/servers trying to connect to the XMPP server.
docs/rolereference.rst
Show inline comments
 
@@ -904,7 +904,7 @@ Parameters
 
  Prosody. Each item is a string with value equal to XMPP user ID
 
  (i.e. ``john.doe@example.com``).
 

	
 
**xmpp_domains** (list, optional, ``{{ ansible_domain }}``)
 
**xmpp_domains** (list, mandatory)
 
  List of domains that are served by this Prosody instance. Each item is a
 
  string specifying a domain.
 

	
roles/xmpp_server/defaults/main.yml
Show inline comments
 
---
 

	
 
enable_backup: false
 
xmpp_domains:
 
  - "{{ ansible_domain }}"
 
xmpp_prosody_package: "prosody-0.10"
 
xmpp_server_tls_protocol: "tlsv1_2+"
 
xmpp_server_tls_ciphers: "\
roles/xmpp_server/molecule/default/group_vars/parameters-mandatory.yml
Show inline comments
 
@@ -2,6 +2,8 @@
 

	
 
xmpp_administrators:
 
  - john.doe@domain1
 
xmpp_domains:
 
  - domain1
 
xmpp_ldap_base_dn: dc=local
 
xmpp_ldap_password: prosodypassword
 
xmpp_ldap_server: ldap-server
roles/xmpp_server/molecule/default/molecule.yml
Show inline comments
 
@@ -37,7 +37,7 @@ platforms:
 
        network_name: private_network
 
        type: static
 

	
 
  - name: parameters-mandatory-stretch64.domain1
 
  - name: parameters-mandatory-stretch64
 
    groups:
 
      - parameters-mandatory
 
      - stretch
roles/xmpp_server/molecule/default/prepare.yml
Show inline comments
 
@@ -22,7 +22,7 @@
 
        - name: ldap-server_ldap
 
          fqdn:
 
            - ldap-server
 
        - name: parameters-mandatory-stretch64.domain1_xmpp
 
        - name: parameters-mandatory-stretch64_xmpp
 
          fqdn:
 
            - parameters-mandatory
 
            - domain1
roles/xmpp_server/molecule/default/tests/test_mandatory.py
Show inline comments
 
@@ -19,12 +19,12 @@ def test_certificate_validity_check_configuration(host):
 

	
 
    hostname = host.run('hostname').stdout.strip()
 

	
 
    config = host.file('/etc/check_certificate/%s.domain1_xmpp.conf' % hostname)
 
    config = host.file('/etc/check_certificate/%s_xmpp.conf' % hostname)
 
    assert config.is_file
 
    assert config.user == 'root'
 
    assert config.group == 'root'
 
    assert config.mode == 0o644
 
    assert config.content_string == "/etc/ssl/certs/%s.domain1_xmpp.pem" % hostname
 
    assert config.content_string == "/etc/ssl/certs/%s_xmpp.pem" % hostname
 

	
 

	
 
def test_prosody_configuration_file_content(host):
 
@@ -39,8 +39,8 @@ def test_prosody_configuration_file_content(host):
 
        config = host.file('/etc/prosody/prosody.cfg.lua')
 

	
 
        assert "admins = { \"john.doe@domain1\",  }" in config.content_string
 
        assert "key = \"/etc/ssl/private/%s.domain1_xmpp.key\";" % hostname in config.content_string
 
        assert "certificate = \"/etc/ssl/certs/%s.domain1_xmpp.pem\";" % hostname in config.content_string
 
        assert "key = \"/etc/ssl/private/%s_xmpp.key\";" % hostname in config.content_string
 
        assert "certificate = \"/etc/ssl/certs/%s_xmpp.pem\";" % hostname in config.content_string
 
        assert "ldap_server = \"ldap-server\"" in config.content_string
 
        assert "ldap_rootdn = \"cn=prosody,ou=services,dc=local\"" in config.content_string
 
        assert "ldap_password = \"prosodypassword\"" in config.content_string
0 comments (0 inline, 0 general)