<commit_before>---
- name: install dnsmasq and bind-utils
  sudo: yes
  yum:
    name: "{{ item }}"
    state: present
  with_items:
    - "dnsmasq-{{ dnsmasq_version }}"
    - "bind-utils-{{ bind_utils_version }}"
  when: inventory_hostname in groups['master']
  tags:
    - dnsmasq

- name: ensure dnsmasq.d directory exists
  sudo: yes
  file:
    path: /etc/dnsmasq.d
    state: directory
  when: inventory_hostname in groups['master']
  tags:
    - dnsmasq

- name: configure dnsmasq
  sudo: yes
  template:
    src: 01-kube-dns.conf.j2
    dest: /etc/dnsmasq.d/01-kube-dns.conf
    mode: 755
  notify:
    - restart dnsmasq
  when: inventory_hostname in groups['master']
  tags:
    - dnsmasq

- name: enable dnsmasq
  sudo: yes
  service:
    name: dnsmasq
    state: started
    enabled: yes
  when: inventory_hostname in groups['master']
  tags:
    - dnsmasq

- name: update resolv.conf with new DNS setup
  sudo: yes
  template:
    src: resolv.conf.j2
    dest: /etc/resolv.conf
    mode: 644
  tags:
    - dnsmasq

- name: disable resolv.conf modification by dhclient
  sudo: yes
  lineinfile: 
    dest: "/etc/sysconfig/network-scripts/ifcfg-{{ ansible_default_ipv4.interface }}"
    state: present
    regexp: '^PEERDNS'
    line: 'PEERDNS="no"'
  tags:
    - dnsmasq<commit_msg>Use 4 number octet in mode for files<commit_after>---
- name: install dnsmasq and bind-utils
  sudo: yes
  yum:
    name: "{{ item }}"
    state: present
  with_items:
    - "dnsmasq-{{ dnsmasq_version }}"
    - "bind-utils-{{ bind_utils_version }}"
  when: inventory_hostname in groups['master']
  tags:
    - dnsmasq

- name: ensure dnsmasq.d directory exists
  sudo: yes
  file:
    path: /etc/dnsmasq.d
    state: directory
  when: inventory_hostname in groups['master']
  tags:
    - dnsmasq

- name: configure dnsmasq
  sudo: yes
  template:
    src: 01-kube-dns.conf.j2
    dest: /etc/dnsmasq.d/01-kube-dns.conf
    mode: 0755
  notify:
    - restart dnsmasq
  when: inventory_hostname in groups['master']
  tags:
    - dnsmasq

- name: enable dnsmasq
  sudo: yes
  service:
    name: dnsmasq
    state: started
    enabled: yes
  when: inventory_hostname in groups['master']
  tags:
    - dnsmasq

- name: update resolv.conf with new DNS setup
  sudo: yes
  template:
    src: resolv.conf.j2
    dest: /etc/resolv.conf
    mode: 0644
  tags:
    - dnsmasq

- name: disable resolv.conf modification by dhclient
  sudo: yes
  lineinfile: 
    dest: "/etc/sysconfig/network-scripts/ifcfg-{{ ansible_default_ipv4.interface }}"
    state: present
    regexp: '^PEERDNS'
    line: 'PEERDNS="no"'
  tags:
    - dnsmasq

{'fraction_non_alphanumeric': 0.11400153022188217, 'fraction_numerical': 0.011094108645753635, 'mean_word_length': 2.7197724039829305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7632029', 'n_tokens_mistral': 1049, 'n_tokens_neox': 997, 'n_words': 244}