diff --git a/roles/xmpp_server/molecule/default/prepare.yml b/roles/xmpp_server/molecule/default/prepare.yml index 2812c9662ec7594f387b3ebe317f216fe175c96a..7764229376c314fceaaebb366e191d113b220edf 100644 --- a/roles/xmpp_server/molecule/default/prepare.yml +++ b/roles/xmpp_server/molecule/default/prepare.yml @@ -7,13 +7,13 @@ tasks: - name: Initialise CA hierarchy - command: "gimmecert init" + ansible.builtin.command: "gimmecert init" args: creates: ".gimmecert/ca/level1.cert.pem" chdir: "tests/data/" - name: Generate server private keys and certificates - command: + ansible.builtin.command: args: chdir: "tests/data/" creates: ".gimmecert/server/{{ item.name }}.cert.pem" @@ -40,7 +40,7 @@ - conference.domain3 - name: Set-up link to generated X.509 material - file: + ansible.builtin.file: src: ".gimmecert" dest: "tests/data/x509" state: link @@ -52,24 +52,24 @@ tasks: - name: Install python for Ansible - raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-minimal) + ansible.builtin.raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-minimal) become: true changed_when: false - name: Update all caches to avoid errors due to missing remote archives - apt: + ansible.builtin.apt: update_cache: true changed_when: false - name: Install tools for testing - apt: + ansible.builtin.apt: name: - gnutls-bin - nmap state: present - name: Use name provided via CLI when running STARTTLS handshake for XMPP via nmap - replace: + ansible.builtin.replace: path: "/usr/share/nmap/nselib/sslcert.lua" regexp: "host\\.name\\)" replace: "host.targetname)" @@ -80,7 +80,7 @@ tasks: - name: Enable TLSv1.0+ in global OpenSSL configuration file in order to be able to test the web_server_tls_protocols parameter - blockinfile: + ansible.builtin.blockinfile: path: "/etc/ssl/openssl.cnf" block: | [openssl_init] @@ -98,7 +98,7 @@ state: present - name: Set-up the hosts file - lineinfile: + ansible.builtin.lineinfile: path: /etc/hosts regexp: "^{{ item.key }}" line: "{{ item.key }} {{ item.value }}" @@ -118,12 +118,12 @@ tasks: - name: Install tool for testing TCP connectivity - apt: + ansible.builtin.apt: name: hping3 state: present - name: Deploy CA certificate - copy: + ansible.builtin.copy: src: tests/data/x509/ca/level1.cert.pem dest: /usr/local/share/ca-certificates/testca.crt owner: root @@ -133,28 +133,28 @@ - Update CA certificate cache - name: Install console-based XMPP client (for interactive testing) - apt: + ansible.builtin.apt: name: mcabber state: present - name: Install console-based XMPP tool (for non-interactive testing) - apt: + ansible.builtin.apt: name: go-sendxmpp state: present - name: Create dedicated group for testing - group: + ansible.builtin.group: name: user state: present - name: Create dedicated user for testing - user: + ansible.builtin.user: name: user group: user - shell: /bin/bash + ansible.builtin.shell: /bin/bash - name: Deploy mcabber configuration files - template: + ansible.builtin.template: src: tests/data/mcabber.cfg.j2 dest: "~user/{{ item.jid }}.cfg" owner: user @@ -185,7 +185,7 @@ handlers: - name: Update CA certificate cache # noqa no-changed-when - command: /usr/sbin/update-ca-certificates --fresh + ansible.builtin.command: /usr/sbin/update-ca-certificates --fresh # [no-changed-when] Commands should not change things if nothing needs doing # Does not matter in test prepare stage. @@ -202,7 +202,7 @@ tasks: - name: Create LDAP accounts for testing - ldap_entry: + community.general.ldap_entry: dn: "{{ item.dn }}" objectClass: "{{ item.objectClass }}" attributes: "{{ item.attributes }}" @@ -268,14 +268,14 @@ tasks: - name: Install console-based XMPP tool (for non-interactive testing) - apt: + ansible.builtin.apt: name: "{{ sendxmpp_package }}" state: present vars: sendxmpp_package: "go-sendxmpp" - name: Deploy small Lua script for listing the enabled modules in Prosody - copy: + ansible.builtin.copy: src: list_prosody_modules.lua dest: "/usr/local/bin/list_prosody_modules.lua" owner: root