diff --git a/molecule/_shared/prepare.yml b/molecule/_shared/prepare.yml index 8bd3c10..3920a6e 100644 --- a/molecule/_shared/prepare.yml +++ b/molecule/_shared/prepare.yml @@ -41,21 +41,6 @@ ansible.builtin.service: name: nginx state: started - when: ansible_virtualization_type != 'docker' - - - name: Start nginx if testing with Docker - when: ansible_virtualization_type == 'docker' - block: - - - name: COMMAND | Docker nginx status - ansible.builtin.command: service nginx status - changed_when: false - failed_when: false - register: ngs - - - name: COMMAND | Docker start nginx - ansible.builtin.command: service nginx start - when: ngs.stdout.find('nginx is not running') != -1 - name: FILE | Create /var/www ansible.builtin.file: @@ -79,4 +64,4 @@ content: ' /dev/null" changed_when: false register: c diff --git a/molecule/debian-10/molecule.yml b/molecule/debian-10/molecule.yml index bb7f019..46e4107 100644 --- a/molecule/debian-10/molecule.yml +++ b/molecule/debian-10/molecule.yml @@ -29,4 +29,4 @@ provisioner: __nginx_conf: /etc/nginx/nginx.conf host_vars: debian-10-php-7.4: - php_version: '7.4' \ No newline at end of file + php_version: '7.4' diff --git a/tests/test.yml b/tests/test.yml index 0400045..65fefa9 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -78,13 +78,13 @@ when: ansible_virtualization_type == 'docker' block: - - name: COMMAND | Docker nginx status + - name: COMMAND | Docker nginx status # noqa: command-instead-of-module ansible.builtin.command: service nginx status changed_when: false failed_when: false register: ngs - - name: COMMAND | Docker start nginx + - name: COMMAND | Docker start nginx # noqa: command-instead-of-module no-changed-when ansible.builtin.command: service nginx start when: ngs.stdout.find('nginx is not running') != -1 @@ -96,7 +96,7 @@ state: reloaded notify: Docker reload nginx - - name: Docker reload nginx + - name: Docker reload nginx # noqa: command-instead-of-module no-changed-when ansible.builtin.command: service nginx reload notify: Docker reload nginx when: ansible_virtualization_type == 'docker' @@ -146,7 +146,7 @@ register: c failed_when: c.stdout == '' - - name: SHELL | Check custom php value + - name: SHELL | Check custom php value # noqa: command-instead-of-module ansible.builtin.shell: "curl -H 'Host: {{ vhost }}' http://127.0.0.1/ini.php 2> /dev/null" changed_when: false register: c