Details
-
Type:
Bug
-
Status: Done
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: 3.17.0
-
Fix Version/s: 3.18.0
-
Component/s: cf-agent, Promise type: files
-
Labels:None
-
Story Points:1
Description
When a file is promised using the content attribute, the file is created if necessary as expected with the expected content. However, there is a warning emitted that no action was requested. I did not expect the warning to be emitted as the content attribute implies create => true.
bundle agent main { files: "/tmp/example.txt" content => "hello there"; }
# cf-agent --no-lock --log-level info --file /tmp/example.cf info: Updated content of '/tmp/example.txt' with content 'hello there' warning: No action was requested for file '/tmp/example.txt'. Maybe a typo in the policy? info: files promise '/tmp/example.txt' repaired
BUG, no action requested for file ... but the file was created:
Shell command with stderr
cat /tmp/example.txt; rm /tmp/example.txt
hello there