From c9e9b5ea538b37abc4f6bb31e02d1b67d487f04d Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 25 Dec 2016 19:47:28 +0200 Subject: [PATCH] - Validate config as a seperate task (not compatible with Ansible's validate). - Remove groups fact gathering, not used since we're adding to ssl-cert group anymore. --- tasks/main.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index b67d502..79ec098 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,10 +11,6 @@ path: /etc/ssl/dhparams register: stat_dhparams -- name: Get groups - getent: - database: group - - name: APT install apt: name: [apache2, apache2-utils] @@ -55,7 +51,6 @@ owner: root group: 0 mode: 0o0644 - validate: apache2ctl configtest notify: - Restart Apache @@ -69,10 +64,13 @@ owner: root group: 0 mode: 0o0644 - validate: apache2ctl configtest notify: - Restart Apache +- name: Validate config + command: apache2ctl configtest + changed_when: False + - name: Enable service service: name: apache2 -- GitLab