diff --git a/roles/web_server/molecule/default/prepare.yml b/roles/web_server/molecule/default/prepare.yml index 4e4b727b882399cd82335e66f3f884a9d0bc03e8..a2786386705b904507e654d59e321465baf3de2d 100644 --- a/roles/web_server/molecule/default/prepare.yml +++ b/roles/web_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" @@ -29,7 +29,7 @@ fqdn: parameters-optional-bookworm - name: Set-up link to generated X.509 material - file: + ansible.builtin.file: src: ".gimmecert" dest: "tests/data/x509" state: link @@ -41,16 +41,16 @@ 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) 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 @@ -62,7 +62,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] @@ -85,7 +85,7 @@ tasks: - name: Set-up the hosts file - lineinfile: + ansible.builtin.lineinfile: path: /etc/hosts regexp: "^{{ item.key }}" line: "{{ item.key }} {{ item.value }}" @@ -99,7 +99,7 @@ 192.168.56.22: "parameters-optional-bookworm" - name: Install curl for testing redirects and webpage content - apt: + ansible.builtin.apt: name: curl state: present @@ -109,17 +109,17 @@ tasks: - name: Install tool for testing TCP connectivity - apt: + ansible.builtin.apt: name: hping3 state: present - name: Install console-based web browser for interactive testing - apt: + ansible.builtin.apt: name: lynx 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 @@ -131,6 +131,6 @@ 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.