<commit_before>---
- name: V-38649 Low  The system default umask for the csh shell must be 077
  replace: backup=yes dest=/etc/csh.cshrc regexp="umask \d\d\d" replace="umask 077"
  tags: [ 'cat3' , 'V-38649' , 'csh' , 'umask' ]

- name: V-38642 Low  The system default umask for daemons must be 027 or 022
  lineinfile: state=present backup=yes dest=/etc/init.d/functions regexp="umask \d\d\d" line="umask 022"
  tags: [ 'cat3' , 'V-38642' , 'umask' ]

- name: "V-38648 Low  The qpidd service must not be running\n    V-38641 Low  The atd service must be disabled\n    V-38640 Low  The Automatic Bug Reporting Tool (abrtd) service must not be running\n    V-38646 Low  The oddjobd service must not be running\n    V-38644 Low  The ntpdate service must not be running\n    V-38650 Low  The rdisc service must not be running\n    V-38437 Low  Automated file system mounting tools must not be enabled unless needed\n    V-38669 Low  The postfix service must be enabled for mail delivery\n    V-38672 Low  The netconsole service must be disabled unless required"
  service: name={{ item.name }} state={{ item.state }} enabled={{ item.enabled }}
  when: "'{{ item.name }}' in sysv_services.stdout_lines and '{{ item.name }}' != 'rhnsd'"
  with_items: rhel6stig_cat3_services
  tags: [ 'cat3' , 'V-38640' , 'abrtd', 'V-38648' , 'qpidd' , 'V-38641' , 'atd' , 'V-38646' , 'oddjobd' , 'V-38644' , 'ntpdate' , 'V-38650' , 'rdisc' , 'V-38437' , 'autofs' , 'V-38669' , 'postfix' , 'V-38672' , 'netconsole' , 'V-38478' , 'rhnsd' ]

- name: V-38478 Low  The Red Hat Network Service (rhnsd) service must not be running, unless using RHN or an RHN Satellite
  service: name=rhnsd state=stopped enabled=false
  tags: [ 'cat3' , 'V-38478' , 'rhnsd' ]
<commit_msg>fixing idempotency for sshd_config file, no change when no changes, no duplicated lines<commit_after>---
- name: V-38649 Low  The system default umask for the csh shell must be 077
  replace: backup=yes dest=/etc/csh.cshrc regexp="umask \d\d\d" replace="umask 077"
  tags: [ 'cat3' , 'V-38649' , 'csh' , 'umask' ]

- name: V-38642 Low  The system default umask for daemons must be 027 or 022
  lineinfile: state=present backup=yes dest=/etc/init.d/functions regexp="umask \d\d\d" line="umask 022"
  tags: [ 'cat3' , 'V-38642' , 'umask' ]

- name: "V-38648 Low  The qpidd service must not be running\n    V-38641 Low  The atd service must be disabled\n    V-38640 Low  The Automatic Bug Reporting Tool (abrtd) service must not be running\n    V-38646 Low  The oddjobd service must not be running\n    V-38644 Low  The ntpdate service must not be running\n    V-38650 Low  The rdisc service must not be running\n    V-38437 Low  Automated file system mounting tools must not be enabled unless needed\n    V-38669 Low  The postfix service must be enabled for mail delivery\n    V-38672 Low  The netconsole service must be disabled unless required"
  service: name={{ item.name }} state={{ item.state }} enabled={{ item.enabled }}
  when: "'{{ item.name }}' in sysv_services.stdout_lines and '{{ item.name }}' != 'rhnsd'"
  with_items: rhel6stig_cat3_services
  tags: [ 'cat3' , 'V-38640' , 'abrtd', 'V-38648' , 'qpidd' , 'V-38641' , 'atd' , 'V-38646' , 'oddjobd' , 'V-38644' , 'ntpdate' , 'V-38650' , 'rdisc' , 'V-38437' , 'autofs' , 'V-38669' , 'postfix' , 'V-38672' , 'netconsole' , 'V-38478' , 'rhnsd' ]

- name: V-38478 Low  The Red Hat Network Service (rhnsd) service must not be running, unless using RHN or an RHN Satellite
  shell: "chkconfig rhnsd off && service rhnsd stop"
  register: result
  failed_when: result.rc != 0 and result.rc != 6
  tags: [ 'cat3' , 'V-38478' , 'rhnsd' ]

{'fraction_non_alphanumeric': 0.1312242090784044, 'fraction_numerical': 0.08088033012379642, 'mean_word_length': 3.6318471337579616, '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': '7341196', 'n_tokens_mistral': 1520, 'n_tokens_neox': 1332, 'n_words': 447}