rollout_console.yml 667 B

1234567891011121314151617181920
  1. ---
  2. - name: Check if console deployment exists
  3. oc_obj:
  4. kind: deployments
  5. name: webconsole
  6. namespace: openshift-web-console
  7. state: list
  8. register: console_deployment
  9. # There's currently no command to trigger a rollout for a k8s deployment
  10. # without changing the pod spec. Add an annotation to force a rollout.
  11. - name: Rollout updated web console deployment
  12. oc_edit:
  13. kind: deployments
  14. name: webconsole
  15. namespace: openshift-web-console
  16. separator: '#'
  17. content:
  18. spec#template#metadata#annotations#installer-triggered-rollout: "{{ ansible_date_time.iso8601_micro }}"
  19. when: console_deployment.results.results.0 | length > 0