Hi,
I confirm the problem with the lastest version of Puppet (4.8.0)
on my Ubuntu Trusty (ie puppet-agent 1.8.0) :
--%<----%<----%<----%<----%<----%<----%<----%<----%<----%<----%<----%<--
root@puppet ~ # puppet --version
4.8.0
root@puppet ~ # puppet apply -e "file {'/tmp/f': ensure => present, content => 'Hello' }"
Notice: Compiled catalog for puppet.athome.priv in environment production in 0.10 seconds
Notice: /Stage[main]/Main/File[/tmp/f]/ensure: defined content as '{md5}8b1a9953c4611296a827abf8c47804d7'
Notice: Applied catalog in 0.21 seconds
root@puppet ~ # puppet apply -e "file {'/tmp/f~': ensure => present, content => 'Hello' }"
Notice: Compiled catalog for puppet.athome.priv in environment production in 0.10 seconds
Notice: /Stage[main]/Main/File[/tmp/f~]/ensure: defined content as '{md5}8b1a9953c4611296a827abf8c47804d7'
Notice: Applied catalog in 0.19 seconds
root@puppet ~ # puppet apply -e "file {'/tmp/~f': ensure => present, content => 'Hello' }"
Notice: Compiled catalog for puppet.athome.priv in environment production in 0.10 seconds
Error: Could not set 'present' on ensure: user f20161110-3350-13n4ulf doesn't exist at line 1
Error: Could not set 'present' on ensure: user f20161110-3350-13n4ulf doesn't exist at line 1
Wrapped exception:
user f20161110-3350-13n4ulf doesn't exist
Error: /Stage[main]/Main/File[/tmp/~f]/ensure: change from absent to present failed: Could not set 'present' on ensure: user f20161110-3350-13n4ulf doesn't exist at line 1
Notice: Applied catalog in 0.19 seconds
--%<----%<----%<----%<----%<----%<----%<----%<----%<----%<----%<----%<--
So, it's seems to be tricky because:
- no problem with '/tmp/f' (normal)
- no problem with '/tmp/f~'
- but error with '/tmp/~f'
I haven't seen a ticket on
https://tickets.puppetlabs.com yet.
It would deserve one in my humble opinion. I can create it is you want. ;)
Regards.