Skip to content

Commit

Permalink
add timesyncd tags
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
  • Loading branch information
konstruktoid committed Jan 3, 2022
1 parent 5fa1f48 commit 783cdef
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tasks/timesyncd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,21 @@
register: timesyncd_status
changed_when: false
failed_when: false
tags:
- systemd
- timesyncd
- CIS-UBUNTU2004-2.1.1.1
- CIS-UBUNTU2004-2.1.1.2

- name: register timedatectl show
command: timedatectl show
register: timedatectl_show
changed_when: timedatectl_show.stdout.find('NTPSynchronized=yes') == -1 and timesyncd_status.rc == 0
tags:
- systemd
- timesyncd
- CIS-UBUNTU2004-2.1.1.1
- CIS-UBUNTU2004-2.1.1.2

- name: timedatectl set-ntp
become: 'yes'
Expand Down

0 comments on commit 783cdef

Please sign in to comment.