main.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ---
  2. - name: Detecting Operating System
  3. stat:
  4. path: /run/ostree-booted
  5. register: ostree_booted
  6. # Locally setup containerized facts for now
  7. - set_fact:
  8. l_is_atomic: "{{ ostree_booted.stat.exists }}"
  9. - set_fact:
  10. l_is_containerized: "{{ (l_is_atomic | bool) or (containerized | default(false) | bool) }}"
  11. - name: Ensure various deps are installed
  12. package: name={{ item }} state=present
  13. with_items: "{{ required_packages }}"
  14. when: not l_is_atomic | bool
  15. - name: Gather Cluster facts and set is_containerized if needed
  16. openshift_facts:
  17. role: common
  18. local_facts:
  19. debug_level: "{{ openshift_debug_level | default(2) }}"
  20. # TODO: Deprecate deployment_type in favor of openshift_deployment_type
  21. deployment_type: "{{ openshift_deployment_type | default(deployment_type) }}"
  22. deployment_subtype: "{{ openshift_deployment_subtype | default(None) }}"
  23. cluster_id: "{{ openshift_cluster_id | default('default') }}"
  24. hostname: "{{ openshift_hostname | default(None) }}"
  25. ip: "{{ openshift_ip | default(None) }}"
  26. is_containerized: "{{ l_is_containerized | default(None) }}"
  27. public_hostname: "{{ openshift_public_hostname | default(None) }}"
  28. public_ip: "{{ openshift_public_ip | default(None) }}"
  29. portal_net: "{{ openshift_portal_net | default(openshift_master_portal_net) | default(None) }}"
  30. http_proxy: "{{ openshift_http_proxy | default(None) }}"
  31. https_proxy: "{{ openshift_https_proxy | default(None) }}"
  32. no_proxy: "{{ openshift_no_proxy | default(None) }}"
  33. generate_no_proxy_hosts: "{{ openshift_generate_no_proxy_hosts | default(True) }}"
  34. no_proxy_internal_hostnames: "{{ openshift_no_proxy_internal_hostnames | default(None) }}"
  35. sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
  36. use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
  37. - name: Set repoquery command
  38. set_fact:
  39. repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins' }}"