I reproduced this with 4.8.0 and filed a ticket. https://tickets.puppetlabs.com/browse/PUP-6914
Seems like it's a ruby thing? https://ruby-doc.org/core-2.1.8/File.html#method-c-expand_path https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/file.rb Usual disclaimer, not a programmer, somebody with a spare clue feel free to pass it along. Or just add said clue to the ticket. On Thu, Nov 10, 2016 at 10:28:16PM +0100, Francois Lafont wrote: > 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. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/864517c9-e8cb-093e-994f-805e6a628c59%40gmail.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20161110224707.GA29097%40iniquitous.heresiarch.ca. For more options, visit https://groups.google.com/d/optout.
