<commit_before>---
# TODO: allow for overriding default ports where possible
- fail:
    msg: "SELinux is disabled, This deployment type requires that SELinux is enabled."
  when: >
    (not ansible_selinux or ansible_selinux.status != 'enabled') and
    deployment_type in ['enterprise', 'online', 'atomic-enterprise', 'openshift-enterprise']

# https://docs.openshift.com/container-platform/3.4/admin_guide/overcommit.html#disabling-swap-memory
- name: Check for swap usage
  command: grep "^[^#].*swap" /etc/fstab
  # grep: match any lines which don't begin with '#' and contain 'swap'
  changed_when: false
  failed_when: false
  register: swap_result

# Disable Swap Block
- block:

    - name: Disable swap
      command: swapoff --all

    - name: Remove swap entries from /etc/fstab
      replace:
        dest: /etc/fstab
        regexp: '(^[^#].*swap.*)'
        replace: '# \1'
        backup: yes

    - name: Add notice about disabling swap
      lineinfile:<commit_msg>cri-o: Continue node without SELinux check<commit_after>---
# TODO: allow for overriding default ports where possible
- fail:
    msg: "SELinux is disabled, This deployment type requires that SELinux is enabled."
  when:
    - (not ansible_selinux or ansible_selinux.status != 'enabled') and deployment_type in ['enterprise', 'online', 'atomic-enterprise', 'openshift-enterprise']
    - not openshift_docker_use_crio | default(false)

# https://docs.openshift.com/container-platform/3.4/admin_guide/overcommit.html#disabling-swap-memory
- name: Check for swap usage
  command: grep "^[^#].*swap" /etc/fstab
  # grep: match any lines which don't begin with '#' and contain 'swap'
  changed_when: false
  failed_when: false
  register: swap_result

# Disable Swap Block
- block:

    - name: Disable swap
      command: swapoff --all

    - name: Remove swap entries from /etc/fstab
      replace:
        dest: /etc/fstab
        regexp: '(^[^#].*swap.*)'
        replace: '# \1'
        backup: yes

    - name: Add notice about disabling swap
      lineinfile:
{'fraction_non_alphanumeric': 0.11937377690802348, 'fraction_numerical': 0.0029354207436399216, 'mean_word_length': 3.207818930041152, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7468768', 'n_tokens_mistral': 673, 'n_tokens_neox': 626, 'n_words': 195}