We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a41450a commit 6f780deCopy full SHA for 6f780de
tasks/level-1/4.2.4.yml
@@ -97,11 +97,17 @@
97
- "4.2.4"
98
- scored
99
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
+
105
- name: 4.2.4 - Ensure permissions on all logfiles are configured (amazon agents)
106
lineinfile:
107
path: /etc/systemd/system/amazon-cloudwatch-agent.service
108
insertafter: ^[Service]
109
line: Umask=0077
110
+ when: cloudwatch.stat.exists
111
tags:
112
- level-1
113
- section-4
0 commit comments