Skip to content

Commit 6f780de

Browse files
author
pbokeefe1027
committed
check for cwagent service
1 parent a41450a commit 6f780de

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tasks/level-1/4.2.4.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,17 @@
9797
- "4.2.4"
9898
- scored
9999

100+
- name: 4.2.4 - Ensure permissions on all logfiles are configured (amazon agents)
101+
stat:
102+
path: /usr/lib/systemd/system/amazon-cloudwatch-agent.service
103+
register: cloudwatch
104+
100105
- name: 4.2.4 - Ensure permissions on all logfiles are configured (amazon agents)
101106
lineinfile:
102107
path: /etc/systemd/system/amazon-cloudwatch-agent.service
103108
insertafter: ^[Service]
104109
line: Umask=0077
110+
when: cloudwatch.stat.exists
105111
tags:
106112
- level-1
107113
- section-4

0 commit comments

Comments
 (0)