---
- import_playbook: init/main.yml

- import_playbook: openshift-master/private/check-client-ca.yml

- import_playbook: openshift-etcd/private/redeploy-certificates.yml

- import_playbook: openshift-master/private/redeploy-certificates.yml

- import_playbook: openshift-etcd/private/restart.yml
  vars:
    g_etcd_certificates_expired: "{{ ('expired' in (hostvars | lib_utils_oo_select_keys(groups['etcd']) | lib_utils_oo_collect('check_results.check_results.etcd') | lib_utils_oo_collect('health'))) | bool }}"

- import_playbook: openshift-master/private/restart.yml

- import_playbook: openshift-node/private/restart.yml
  vars:
    openshift_node_restart_docker_required: False

- import_playbook: openshift-master/private/enable_bootstrap.yml
  when: openshift_redeploy_openshift_ca | default(false) | bool

- import_playbook: openshift-node/private/certificates-backup.yml
  when: openshift_redeploy_openshift_ca | default(false) | bool

- import_playbook: openshift-node/private/join.yml
  when: openshift_redeploy_openshift_ca | default(false) | bool

- import_playbook: openshift-node/private/restart.yml
  when: openshift_redeploy_openshift_ca | default(false) | bool
  vars:
    openshift_node_restart_docker_required: true
    openshift_node_restart_drain: true

- import_playbook: openshift-hosted/private/redeploy-router-certificates.yml
  when: openshift_hosted_manage_router | default(true) | bool

- import_playbook: openshift-hosted/private/redeploy-registry-certificates.yml
  when: openshift_hosted_manage_registry | default(true) | bool

- import_playbook: openshift-master/private/revert-client-ca.yml

- import_playbook: openshift-master/private/restart.yml

- import_playbook: openshift-web-console/private/redeploy-certificates.yml
  when: openshift_web_console_install | default(true) | bool

- import_playbook: openshift-console/private/redeploy-certificates.yml
  when: openshift_console_install | default(true) | bool

- import_playbook: metrics-server/private/redeploy-certificates.yml
  when: openshift_metrics_server_install | default(openshift_metrics_install_metrics | default(false)) | bool

- import_playbook: openshift-logging/private/redeploy-certificates.yml
  when: openshift_logging_install_logging | default(false) | bool

- import_playbook: openshift-monitoring/private/redeploy-certificates.yml
  when: openshift_cluster_monitoring_operator_install | default(true) | bool

- import_playbook: openshift-service-catalog/private/redeploy-certificates.yml
  when: openshift_enable_service_catalog | default(true) | bool
