main.yml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. l_is_openvswitch_system_container: "{{ (use_openvswitch_system_container | default(use_system_containers) | bool) }}"
  12. l_is_node_system_container: "{{ (use_node_system_container | default(use_system_containers) | bool) }}"
  13. l_is_master_system_container: "{{ (use_master_system_container | default(use_system_containers) | bool) }}"
  14. l_is_etcd_system_container: "{{ (use_etcd_system_container | default(use_system_containers) | bool) }}"
  15. - name: Ensure various deps are installed
  16. package: name={{ item }} state=present
  17. with_items: "{{ required_packages }}"
  18. when: not l_is_atomic | bool
  19. - name: Gather Cluster facts and set is_containerized if needed
  20. openshift_facts:
  21. role: common
  22. local_facts:
  23. debug_level: "{{ openshift_debug_level | default(2) }}"
  24. # TODO: Deprecate deployment_type in favor of openshift_deployment_type
  25. deployment_type: "{{ openshift_deployment_type | default(deployment_type) }}"
  26. deployment_subtype: "{{ openshift_deployment_subtype | default(None) }}"
  27. cluster_id: "{{ openshift_cluster_id | default('default') }}"
  28. hostname: "{{ openshift_hostname | default(None) }}"
  29. ip: "{{ openshift_ip | default(None) }}"
  30. is_containerized: "{{ l_is_containerized | default(None) }}"
  31. is_openvswitch_system_container: "{{ l_is_openvswitch_system_container | default(false) }}"
  32. is_node_system_container: "{{ l_is_node_system_container | default(false) }}"
  33. is_master_system_container: "{{ l_is_master_system_container | default(false) }}"
  34. is_etcd_system_container: "{{ l_is_etcd_system_container | default(false) }}"
  35. system_images_registry: "{{ system_images_registry | default('') }}"
  36. public_hostname: "{{ openshift_public_hostname | default(None) }}"
  37. public_ip: "{{ openshift_public_ip | default(None) }}"
  38. portal_net: "{{ openshift_portal_net | default(openshift_master_portal_net) | default(None) }}"
  39. http_proxy: "{{ openshift_http_proxy | default(None) }}"
  40. https_proxy: "{{ openshift_https_proxy | default(None) }}"
  41. no_proxy: "{{ openshift_no_proxy | default(None) }}"
  42. generate_no_proxy_hosts: "{{ openshift_generate_no_proxy_hosts | default(True) }}"
  43. no_proxy_internal_hostnames: "{{ openshift_no_proxy_internal_hostnames | default(None) }}"
  44. sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
  45. use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
  46. - name: Set repoquery command
  47. set_fact:
  48. repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins' }}"