From 64a01c573b945245e1f56f58b39c836f9074815c Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 24 May 2017 11:26:12 +0100 Subject: [PATCH] Use command instead of debug for handlers Due to the debug message plugin the handler restart messages show at the end of the playbook execution which is a little confusing. Using debug also requires setting changed_when to true which is a little extra bit of code which we do not have to carry. Instead we use the command module which is simple, works and less wordy. Change-Id: I9e3acb966c0d16b61fbc998642e36f4015064155 --- handlers/main.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 011f35de..8998c833 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -14,9 +14,7 @@ # limitations under the License. - name: Restart web server on first node - debug: - msg: "Restarting web server on first node" - changed_when: true + command: "/bin/true" notify: - Restart web server - Wait for web server to complete starting @@ -26,9 +24,7 @@ - keystone-config - name: Restart web server on other nodes - debug: - msg: "Restarting web server on other nodes" - changed_when: true + command: "/bin/true" notify: - Restart web server - Wait for web server to complete starting @@ -65,9 +61,7 @@ - keystone-config - name: Restart uWSGI on first node - debug: - msg: "Restart uWSGI on first node" - changed_when: true + command: "/bin/true" when: - inventory_hostname == groups['keystone_all'][0] notify: @@ -79,9 +73,7 @@ - keystone-config - name: Restart uWSGI on other nodes - debug: - msg: "Restart uWSGI on other nodes" - changed_when: true + command: "/bin/true" when: - inventory_hostname != groups['keystone_all'][0] notify: