diff --git a/tasks/main.yml b/tasks/main.yml index d6cdb61..a318c7b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -17,7 +17,7 @@ # Figure out what version of Apache is installed. - name: Get installed version of Apache. - command: "{{ apache_daemon }} -v" + shell: "{{apache_daemon_path}}{{ apache_daemon }} -v" changed_when: false always_run: yes register: _apache_version diff --git a/vars/Debian.yml b/vars/Debian.yml index d91ad0a..59cd7c3 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -1,5 +1,6 @@ --- apache_daemon: apache2 +apache_daemon_path: /usr/sbin/ apache_server_root: /etc/apache2 apache_conf_path: /etc/apache2 diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 607c3ff..8911b3d 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -1,5 +1,6 @@ --- apache_daemon: httpd +apache_daemon_path: /usr/sbin/ apache_server_root: /etc/httpd apache_conf_path: /etc/httpd/conf.d