main.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ---
  2. - name: Set docker facts
  3. openshift_facts:
  4. role: "{{ item.role }}"
  5. local_facts: "{{ item.local_facts }}"
  6. with_items:
  7. - role: docker
  8. local_facts:
  9. selinux_enabled: "{{ openshift_docker_selinux_enabled | default(None) }}"
  10. log_driver: "{{ openshift_docker_log_driver | default(None) }}"
  11. log_options: "{{ openshift_docker_log_options | default(None) }}"
  12. options: "{{ openshift_docker_options | default(None) }}"
  13. disable_push_dockerhub: "{{ openshift_disable_push_dockerhub | default(None) }}"
  14. hosted_registry_insecure: "{{ openshift_docker_hosted_registry_insecure | default(openshift.docker.hosted_registry_insecure | default(False)) }}"
  15. hosted_registry_network: "{{ openshift_docker_hosted_registry_network | default(None) }}"
  16. use_system_container: "{{ openshift_docker_use_system_container | default(False) }}"
  17. use_crio: "{{ openshift_use_crio | default(False) }}"
  18. - role: node
  19. local_facts:
  20. sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}"
  21. - set_fact:
  22. docker_selinux_enabled: "{{ openshift.docker.selinux_enabled | default(omit) }}"
  23. docker_log_driver: "{{ openshift.docker.log_driver | default(omit) }}"
  24. docker_log_options: "{{ openshift.docker.log_options | default(omit) }}"
  25. docker_push_dockerhub: "{{ openshift.docker.disable_push_dockerhub
  26. | default(omit) }}"
  27. docker_http_proxy: "{{ openshift.common.http_proxy | default(omit) }}"
  28. docker_https_proxy: "{{ openshift.common.https_proxy | default(omit) }}"
  29. docker_no_proxy: "{{ openshift.common.no_proxy | default(omit) }}"
  30. - set_fact:
  31. docker_options: "--insecure-registry={{ openshift.docker.hosted_registry_network }} {{ openshift.docker.options | default ('') }}"
  32. when: openshift.docker.hosted_registry_insecure | default(False) | bool and openshift.docker.hosted_registry_network is defined
  33. register: hosted_registry_options
  34. - set_fact:
  35. docker_options: "{{ openshift.docker.options | default(omit) }}"
  36. when: hosted_registry_options | skipped