<commit_before>- block:
    - name: "HIGH | V-38476 | PATCH | Vendor-provided cryptographic certificates must be installed to verify the integrity of system software"
      rpm_key:
          state: present
          key: "{{ rhel6stig_gpg_key_loc.redhat }}"
      when: "ansible_distribution == 'RedHat'"

    - name: "HIGH | V-38476 | PATCH | Vendor-provided cryptographic certificates must be installed to verify the integrity of system software"
      rpm_key:
          state: present
          key: "{{ rhel6stig_gpg_key_loc.centos }}"
      when: "ansible_distribution == 'CentOS'"
  tags:
      - cat1
      - high
      - V-38476
      - patch
      - rpm

- block:
    - name: "HIGH | V-38491 | PATCH | There must be no hosts.equiv on the system"
      file:
          state: absent
          dest: /etc/hosts.equiv
      tags:
          - hosts_equiv

    - name: "HIGH | V-38491 | PATCH | There must be no .rhosts files on the system"
      file:
        state: absent
        dest: ~{{ item }}/.rhosts
      with_items: "{{ users.stdout_lines }}"
      tags:
          - rhosts
  tags:
      - cat1
      - high
      - V-38491
      - patch

- name: "HIGH | V-38497 | PATCH | The system must not have accounts configured with blank or null passwords"
  replace:
      dest: /etc/pam.d/system-auth
      regexp: '(\s+)nullok\s*'
      replace: '\1'
  tags:
      - cat1
      - high
      - V-38497
      - patch
      - passwords

- name: "HIGH | V-38587 | PATCH | The telnet-server package must not be installed"
  yum:
    name: telnet-server
    state: absent<commit_msg>work around symlink issue with upstream "replace" module<commit_after>- block:
    - name: "HIGH | V-38476 | PATCH | Vendor-provided cryptographic certificates must be installed to verify the integrity of system software"
      rpm_key:
          state: present
          key: "{{ rhel6stig_gpg_key_loc.redhat }}"
      when: "ansible_distribution == 'RedHat'"

    - name: "HIGH | V-38476 | PATCH | Vendor-provided cryptographic certificates must be installed to verify the integrity of system software"
      rpm_key:
          state: present
          key: "{{ rhel6stig_gpg_key_loc.centos }}"
      when: "ansible_distribution == 'CentOS'"
  tags:
      - cat1
      - high
      - V-38476
      - patch
      - rpm

- block:
    - name: "HIGH | V-38491 | PATCH | There must be no hosts.equiv on the system"
      file:
          state: absent
          dest: /etc/hosts.equiv
      tags:
          - hosts_equiv

    - name: "HIGH | V-38491 | PATCH | There must be no .rhosts files on the system"
      file:
        state: absent
        dest: ~{{ item }}/.rhosts
      with_items: "{{ users.stdout_lines }}"
      tags:
          - rhosts
  tags:
      - cat1
      - high
      - V-38491
      - patch

- name: "HIGH | V-38497 | PATCH | The system must not have accounts configured with blank or null passwords"
  replace:
      dest: /etc/pam.d/system-auth
      follow: yes
      regexp: '(\s+)nullok\s*'
      replace: '\1'
  tags:
      - cat1
      - high
      - V-38497
      - patch
      - passwords

- name: "HIGH | V-38587 | PATCH | The telnet-server package must not be installed"
  yum:
    name: telnet-server
    state: absent
{'fraction_non_alphanumeric': 0.10349088662341674, 'fraction_numerical': 0.03151065801668211, 'mean_word_length': 1.9223826714801444, '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': '5954262', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1034, 'n_words': 310}