Bug #872
"replace=>false" file attribute is not handled when using content
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | language | |||
| Target version: | 0.24.0 | |||
| Affected Puppet version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
The replace attribute of the file type is only handled when using source and not with content.
file-content-replace-1.pp:
file {"/tmp/test1":
content => "Hello world",
replace => false,
}
file-content-replace-2.pp:
file {"/tmp/test1":
content => "bye bye",
replace => false,
}
$ puppet -v file-content-replace-1.pp
info: Found dole in none
notice: //File[/tmp/test1]/content: created file with contents {md5}3e25960a79dbc69b674cd4ec67a72c62
$ cat /tmp/test1; echo
Hello world
$ puppet -v file-content-replace-2.pp
info: Found dole in none
info: //File[/tmp/test1]: Filebucketed to puppet with sum 3e25960a79dbc69b674cd4ec67a72c62
notice: //File[/tmp/test1]/content: changed file contents from {md5}3e25960a79dbc69b674cd4ec67a72c62 to {md5}45c2ca10522952363ec8471e3194077c
$ cat /tmp/test1; echo
bye bye
$
History
Updated by Francois Deppierraz over 4 years ago
Attached patch hopefully fix it
Updated by Luke Kanies over 4 years ago
- Status changed from 1 to 2
Updated by Luke Kanies over 4 years ago
Test code for this would be great.
Updated by David Schmitt over 4 years ago
Applied the patch together with a test to the rest/tests-for-872 branch in my repo at git://git.black.co.at/puppet-bugfixes
Updated by Francois Deppierraz over 4 years ago
DavidS' version of the test is much better, feel free to discard my last patch.
Updated by Luke Kanies over 4 years ago
- Status changed from 2 to Closed
- 7 set to fixed