service.yml 614 B

1234567891011121314151617181920
  1. ---
  2. - name: Populate g_service_masters host group if needed
  3. hosts: localhost
  4. gather_facts: no
  5. connection: local
  6. become: no
  7. tasks:
  8. - fail: msg="new_cluster_state is required to be injected in this playbook"
  9. when: new_cluster_state is not defined
  10. - name: Evaluate g_service_masters
  11. add_host: name={{ item }} groups=g_service_masters
  12. with_items: oo_host_group_exp | default([])
  13. - name: Change state on master instance(s)
  14. hosts: g_service_masters
  15. connection: ssh
  16. gather_facts: no
  17. tasks:
  18. - service: name={{ openshift.common.service_type }}-master state="{{ new_cluster_state }}"