<commit_before>- name: subscribe RHEL
  redhat_subscription: state=present username={{ rhsm_username }} password={{ <PASSWORD> }} autosubscribe=false
- name: check subscriptions
  shell: subscription-manager list --consumed | grep -q "Pool ID" || true
  register: subscription_list
  changed_when: False
- name: attach to pool
  command: 'subscription-manager attach --pool={{ poolid }}'
  when: subscription_list.stdout is not defined or poolid != subscription_list.stdout | regex_replace('Pool ID:\\s+(\\S*).*', '\\1')
- name: enable repos
  command: 'subscription-manager repos --disable="*" {% for repo in repos %} --enable="{{repo}}" {% endfor %}'
- name: upgrade packages
  yum: name=* state=latest
- name: install all prerequisites
  yum: name="{{ packages }}" state=latest
  notify:
    - reboot server
    - waiting for server to come back
  when: not (packages is undefined or packages is none or pacakges | trim == '')
- block:
  - name: enable services
    service: name={{ item }} enabled=yes state=started
    with_items: "{{ enable_services }}"
  when: enable_services is defined
- block:
  - name: disable services
    service: name={{item}} enabled=no state=stopped
    with_items: "{{ disable_services }}"
  when: disable_services is defined
- meta: flush_handlers
<commit_msg>prevent error message in playbook log when system not subscribed<commit_after>- name: subscribe RHEL
  redhat_subscription: state=present username={{ rhsm_username }} password={{ <PASSWORD> }} autosubscribe=false
- name: check subscriptions
  shell: subscription-manager list --consumed | grep "Pool ID" || true
  register: subscription_list
  changed_when: False
- name: attach to pool
  command: 'subscription-manager attach --pool={{ poolid }}'
  when: subscription_list.stdout is not defined or poolid != subscription_list.stdout | regex_replace('Pool ID:\\s+(\\S*).*', '\\1')
- name: enable repos
  command: 'subscription-manager repos --disable="*" {% for repo in repos %} --enable="{{repo}}" {% endfor %}'
- name: upgrade packages
  yum: name=* state=latest
- name: install all prerequisites
  yum: name="{{ packages }}" state=latest
  notify:
    - reboot server
    - waiting for server to come back
  when: not (packages is undefined or packages is none or packages | trim == '')
- name: enable services
  service: name={{ item }} enabled=yes state=started
  with_items: "{{ enable_services }}"
  when: not (enable_services is undefined or enable_services is none or enable_services | trim == '')
- name: disable services
  service: name={{item}} enabled=no state=stopped
  with_items: "{{ disable_services }}"
  when: not (disable_services is undefined or disable_services is none or disable_services | trim == '')
- meta: flush_handlers

{'fraction_non_alphanumeric': 0.12864431486880468, 'fraction_numerical': 0.0007288629737609329, 'mean_word_length': 4.446428571428571, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '7242003', 'n_tokens_mistral': 794, 'n_tokens_neox': 781, 'n_words': 274}