config.yml 1.4 KB

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