main.yml 2.7 KB

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