config.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ---
  2. - name: get worker ignition file
  3. command: >
  4. curl -k {{ openshift_bootstrap_endpoint }}
  5. register: l_worker_bootstrap
  6. when: openshift_bootstrap_endpoint is defined
  7. - set_fact:
  8. ign_contents: "{{ l_worker_bootstrap.stdout }}"
  9. when: openshift_bootstrap_endpoint is defined
  10. - set_fact:
  11. ign_contents: "{{ lookup('file', openshift_ignition_file_path) }}"
  12. when: openshift_ignition_file_path is defined
  13. - debug:
  14. var: ign_contents
  15. # parse_ignition is a custom module in lib_utils
  16. - name: parse ignition file
  17. parse_ignition:
  18. ign_file_contents: "{{ ign_contents }}"
  19. register: l_parse_ignition_res
  20. - import_tasks: create_files_from_ignition.yml
  21. vars:
  22. l_parse_ignition_dict: "{{ l_parse_ignition_res }}"
  23. #### Disable SWAP #####
  24. # https://docs.openshift.com/container-platform/3.4/admin_guide/overcommit.html#disabling-swap-memory
  25. # swapoff is a custom module in lib_utils that comments out swap entries in
  26. # /etc/fstab and runs swapoff -a, if necessary.
  27. - name: Disable swap
  28. swapoff: {}
  29. when: openshift_disable_swap | default(true) | bool
  30. # The atomic-openshift-node service will set this parameter on
  31. # startup, but if the network service is restarted this setting is
  32. # lost. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1372388
  33. - sysctl:
  34. name: net.ipv4.ip_forward
  35. value: 1
  36. sysctl_file: "/etc/sysctl.d/99-openshift.conf"
  37. reload: yes
  38. - name: Setting sebool container_manage_cgroup
  39. seboolean:
  40. name: container_manage_cgroup
  41. state: yes
  42. persistent: yes