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
This commit is contained in:
Jesse Pretorius 2017-05-24 11:26:12 +01:00
parent 2a08919aef
commit 64a01c573b

View File

@ -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: