main.yml 944 B

123456789101112131415161718192021222324
  1. ---
  2. - name: Install the base package for admin tooling
  3. action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }} state=present"
  4. when: not openshift.common.is_containerized | bool
  5. register: install_result
  6. - name: Reload generated facts
  7. openshift_facts:
  8. when: install_result | changed
  9. - name: Create openshift_master_config_dir if it doesn't exist
  10. file:
  11. path: "{{ openshift_master_config_dir }}"
  12. state: directory
  13. - name: Create the master certificates if they do not already exist
  14. command: >
  15. {{ openshift.common.admin_binary }} create-master-certs
  16. --hostnames={{ master_hostnames | join(',') }}
  17. --master={{ openshift.master.api_url }}
  18. --public-master={{ openshift.master.public_api_url }}
  19. --cert-dir={{ openshift_master_config_dir }} --overwrite=false
  20. when: master_certs_missing | bool