123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- ---
- - name: get worker ignition file
- command: >
- curl -k {{ openshift_bootstrap_endpoint }}
- register: l_worker_bootstrap
- - debug:
- var: l_worker_bootstrap.stdout
- - name: parse ignition file
- parse_ignition:
- ign_file_contents: "{{ l_worker_bootstrap.stdout }}"
- register: l_parse_ignition_res
- - name: Create all the directories we will need
- command: "mkdir -p {{ item }}"
- with_items: "{{ l_parse_ignition_res.dir_list }}"
- - name: create files from ignition contents
- copy:
- content: "{{ item.value.contents }}"
- dest: "{{ item.key }}"
- mode: "{{ l_file_mode }}"
- with_dict: "{{ l_parse_ignition_res.files_dict }}"
- vars:
- l_mode_prepend: "{{ '0' if (item.value.mode | length < 4) else '' }}"
- l_file_mode: "{{ l_mode_prepend ~ item.value.mode }}"
- #### Disable SWAP #####
- # https://docs.openshift.com/container-platform/3.4/admin_guide/overcommit.html#disabling-swap-memory
- # swapoff is a custom module in lib_utils that comments out swap entries in
- # /etc/fstab and runs swapoff -a, if necessary.
- - name: Disable swap
- swapoff: {}
- when: openshift_disable_swap | default(true) | bool
- # The atomic-openshift-node service will set this parameter on
- # startup, but if the network service is restarted this setting is
- # lost. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1372388
- - sysctl:
- name: net.ipv4.ip_forward
- value: 1
- sysctl_file: "/etc/sysctl.d/99-openshift.conf"
- reload: yes
- - name: Setting sebool container_manage_cgroup
- seboolean:
- name: container_manage_cgroup
- state: yes
- persistent: yes
|