Use listen instead of chained notifiers

From Ansible 2.2 onwards, listen can be used for
handlers instead of chaining notifiers. The
handlers are then executed in the sequence
present in the handler file.

Change-Id: I82dcb2fb8e38fcceca224f39fe18710a50e2090f
This commit is contained in:
Jimmy McCrory
2018-03-17 14:12:48 -07:00
parent 1240de4e5d
commit 35c3f3b73e

View File

@@ -13,13 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Restart cloudkitty services
command: "/bin/true"
notify:
- Stop services
- Copy new policy file into place
- Start services
- name: Stop services
service:
name: "{{ item.value.service_name }}"
@@ -32,6 +25,7 @@
until: _stop | success
retries: 5
delay: 2
listen: Restart cloudkitty services
# Note (odyssey4me):
# The policy.json file is currently read continually by the services
@@ -49,6 +43,7 @@
group: "{{ cloudkitty_system_group_name }}"
mode: "0640"
remote_src: yes
listen: Restart cloudkitty services
- name: Start services
service:
@@ -62,3 +57,4 @@
until: _start | success
retries: 5
delay: 2
listen: Restart cloudkitty services