---
- name: Check if descheduler cronjob exists
  oc_obj:
    state: list
    kind: cronjob
    name: "{{ openshift_descheduler_cronjob_name }}"
    namespace: openshift-descheduler
  register: descheduler_cronjob

- name: Upgrade descheduler cronjob
  include_tasks: install_descheduler.yaml
  when:
  - descheduler_cronjob.module_results.results[0] != {}
