Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Coremunity
-
Coremunity Kanban
-
Bug Fix
-
Puppet can now manage files whose names start with tilde "~" characters
Description
When a file in a directory used as a source for a recursive file resource starts with a ~, then it's evaluated as a username. I didn't check to see if other patterns expand. This is a real edge case, except that some editors save backup files with a prepended ~.
root@ip-172-31-8-159:~ # puppet apply test.pp
|
Notice: Compiled catalog for puppetfactory.puppetlabs.vm in environment production in 0.03 seconds
|
Notice: /Stage[main]/Main/File[/tmp/test]/ensure: created
|
Error: Could not set 'file' on ensure: user bar.txt20160201-23101-1o0dulq doesn't exist
|
Error: Could not set 'file' on ensure: user bar.txt20160201-23101-1o0dulq doesn't exist
|
Wrapped exception:
|
user bar.txt20160201-23101-1o0dulq doesn't exist
|
Error: /Stage[main]/Main/File[/tmp/test/~bar.txt]/ensure: change from absent to file failed: Could not set 'file' on ensure: user bar.txt20160201-23101-1o0dulq doesn't exist
|
Notice: Applied catalog in 0.28 seconds
|
root@ip-172-31-8-159:~ # cat test.pp
|
file { '/tmp/test':
|
ensure => directory,
|
recurse => true,
|
source => '/root/foo',
|
}
|
|
root@ip-172-31-8-159:~ # ls foo/
|
~bar.txt
|
Attachments
Issue Links
- is duplicated by
-
PUP-6914 ruby expand_path in file type breaks leading-tilde file resources
-
- Resolved
-