diff --git a/roles/xmpp_server/molecule/default/prepare.yml b/roles/xmpp_server/molecule/default/prepare.yml index 731236009345f9e0520cea86b3058e53d511ef0c..30ec05e897377b04761353736ae4b513a635ad75 100644 --- a/roles/xmpp_server/molecule/default/prepare.yml +++ b/roles/xmpp_server/molecule/default/prepare.yml @@ -2,21 +2,21 @@ - name: Prepare hosts: all - gather_facts: False + gather_facts: false tasks: - name: Install python for Ansible raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) - become: True - changed_when: False + become: true + changed_when: false - hosts: all - become: yes + become: true tasks: - name: Update all caches to avoid errors due to missing remote archives apt: - update_cache: yes - changed_when: False + update_cache: true + changed_when: false - name: Set-up the hosts file lineinfile: @@ -34,13 +34,13 @@ 10.31.127.31: "parameters-optional domain2 proxy.domain2 conference.domain2 domain3 proxy.domain3 conference.domain3" - hosts: client1 - become: yes + become: true tasks: - name: Install tool for testing TCP connectivity apt: name: hping3 - state: installed + state: present - name: Deploy CA certificate copy: @@ -55,12 +55,12 @@ - name: Install console-based XMPP client (for interactive testing) apt: name: mcabber - state: installed + state: present - name: Install console-based XMPP tool (for non-interactive testing) apt: name: sendxmpp - state: installed + state: present - name: Create dedicated group for testing group: @@ -108,110 +108,16 @@ command: /usr/sbin/update-ca-certificates --fresh - hosts: ldap-server - become: yes + become: true roles: - - role: ldap_server - ldap_admin_password: admin - ldap_entries: - - # Users - - dn: uid=john,ou=people,dc=local - attributes: - objectClass: - - inetOrgPerson - - simpleSecurityObject - userPassword: johnpassword - uid: john - cn: John Doe - sn: Doe - mail: john.doe@domain1 - - dn: uid=jane,ou=people,dc=local - attributes: - objectClass: - - inetOrgPerson - - simpleSecurityObject - userPassword: janepassword - uid: jane - cn: Jane Doe - sn: Doe - mail: jane.doe@domain2 - - dn: uid=mick,ou=people,dc=local - attributes: - objectClass: - - inetOrgPerson - - simpleSecurityObject - userPassword: mickpassword - uid: mick - cn: Mick Doe - sn: Doe - mail: mick.doe@domain3 - - - dn: uid=noxmpp,ou=people,dc=local - attributes: - objectClass: - - inetOrgPerson - - simpleSecurityObject - userPassword: noxmpppassword - uid: noxmpp - cn: No XMPP - sn: XMPP - mail: noxmpp@domain1 - - # Groups - - dn: "cn=xmpp,ou=groups,dc=local" - state: append - attributes: - uniqueMember: - - uid=john,ou=people,dc=local - - uid=jane,ou=people,dc=local - - uid=mick,ou=people,dc=local - - ldap_server_consumers: - - name: prosody - password: prosodypassword - - ldap_server_domain: "local" - ldap_server_groups: - - name: xmpp - ldap_server_organization: "Example" - ldap_server_tls_certificate: "{{ lookup('file', 'tests/data/x509/ldap-server_ldap.cert.pem') }}" - ldap_server_tls_key: "{{ lookup('file', 'tests/data/x509/ldap-server_ldap.key.pem') }}" - - # common - ca_certificates: - testca: "{{ lookup('file', 'tests/data/x509/ca.cert.pem') }}" - - # ldap_client - ldap_client_config: - - comment: CA truststore - option: TLS_CACERT - value: /etc/ssl/certs/testca.cert.pem - - comment: Ensure TLS is enforced - option: TLS_REQCERT - value: demand - - comment: Base DN - option: BASE - value: dc=local - - comment: URI - option: URI - value: ldapi:/// - - - role: backup_server - backup_host_ssh_private_keys: - dsa: "{{ lookup('file', 'tests/data/ssh/server_dsa') }}" - rsa: "{{ lookup('file', 'tests/data/ssh/server_rsa') }}" - ed25519: "{{ lookup('file', 'tests/data/ssh/server_ed25519') }}" - ecdsa: "{{ lookup('file', 'tests/data/ssh/server_ecdsa') }}" - backup_clients: - - server: parameters-optional - ip: 10.31.127.31 - public_key: "{{ lookup('file', 'tests/data/ssh/parameters-optional.pub') }}" + - ldap_server + - backup_server - hosts: parameters-optional - become: yes + become: true tasks: - name: Install console-based XMPP tool (for non-interactive testing) apt: name: sendxmpp - state: installed + state: present