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: Ibe45c76826f9d9830e1315417f336c2d7e23150c
This commit is contained in:
parent
b5236e0ebc
commit
9cbff60731
@ -13,13 +13,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Restart cinder services
|
|
||||||
command: "/bin/true"
|
|
||||||
notify:
|
|
||||||
- Stop services
|
|
||||||
- Copy new policy file into place
|
|
||||||
- Start services
|
|
||||||
|
|
||||||
- name: Stop services
|
- name: Stop services
|
||||||
service:
|
service:
|
||||||
name: "{{ item.service_name }}"
|
name: "{{ item.service_name }}"
|
||||||
@ -31,6 +24,7 @@
|
|||||||
until: _stop | success
|
until: _stop | success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
|
listen: Restart cinder services
|
||||||
|
|
||||||
# Note (odyssey4me):
|
# Note (odyssey4me):
|
||||||
# The policy.json file is currently read continually by the services
|
# The policy.json file is currently read continually by the services
|
||||||
@ -48,6 +42,7 @@
|
|||||||
group: "{{ cinder_system_group_name }}"
|
group: "{{ cinder_system_group_name }}"
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
listen: Restart cinder services
|
||||||
|
|
||||||
- name: Start services
|
- name: Start services
|
||||||
service:
|
service:
|
||||||
@ -60,6 +55,7 @@
|
|||||||
until: _start | success
|
until: _start | success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
|
listen: Restart cinder services
|
||||||
|
|
||||||
- name: Ensure tgt service restarted
|
- name: Ensure tgt service restarted
|
||||||
service:
|
service:
|
||||||
|
Loading…
Reference in New Issue
Block a user