Skip to content

Commit

Permalink
Addressed #381
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
  • Loading branch information
uk-bolly committed Jun 18, 2024
1 parent 3f53f49 commit 0148023
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tasks/prelim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
- name: "PRELIM | Optional | If IPv6 disable to stop chronyd listening"
ansible.builtin.lineinfile:
path: /etc/sysconfig/chronyd
regexp: ^OPTIONS="(.*)"
regexp: '^OPTIONS="(?!.* -4.*)(.*)"'
line: OPTIONS="\1 -4"
backrefs: true
notify: restart chronyd
Expand Down
7 changes: 4 additions & 3 deletions tasks/section_2/cis_2.1.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@
dest: /etc/chrony.conf
owner: root
group: root
mode: 0644
mode: '0644'
when: rhel8cis_chrony_ansible_managed

- name: "2.1.2 | PATCH | Ensure chrony is configured | modify /etc/sysconfig/chronyd"
ansible.builtin.lineinfile:
path: /etc/sysconfig/chronyd
regexp: OPTIONS=\"(.*)(?!-u chrony)(.*)"
line: OPTIONS="\1\2 -u chrony"
regexp: '^OPTIONS="(?!.* -u chrony.*)(.*)"'
line: OPTIONS="\1 -u chrony"
create: true
backrefs: true
mode: '0644'
notify: restart chronyd

when:
- rhel8cis_time_synchronization == "chrony"
Expand Down

0 comments on commit 0148023

Please sign in to comment.