I can reproduce this using puppet 4.4.2 from puppet-agent 1.4.2, definitely
seems like a bug. You can "cd ~user" in a bash shell so I wonder if somebody
somewhere made something which works similarly. I'd be interested in watching
the bug you file because I'm nosy.
$ cat /tmp/x.pp
file { '/tmp/x~x':
content => "x\n",
}
file { '/tmp/~x':
content => "x\n",
}
file { '/tmp/x~':
content => "x\n",
}
$ puppet apply /tmp/x.pp
Notice: Compiled catalog for cwl.hostopia.com in environment production in 0.04
seconds
Notice: /Stage[main]/Main/File[/tmp/x~x]/ensure: defined content as
'{md5}401b30e3b8b5d629635a5c613cdb7919'
Error: Could not set 'file' on ensure: user x20161110-7118-fwfpjo doesn't exist
at 5:/tmp/x.pp
Error: Could not set 'file' on ensure: user x20161110-7118-fwfpjo doesn't exist
at 5:/tmp/x.pp
Wrapped exception:
user x20161110-7118-fwfpjo doesn't exist
Error: /Stage[main]/Main/File[/tmp/~x]/ensure: change from absent to file
failed: Could not set 'file' on ensure: user x20161110-7118-fwfpjo doesn't
exist at 5:/tmp/x.pp
Notice: /Stage[main]/Main/File[/tmp/x~]/ensure: defined content as
'{md5}401b30e3b8b5d629635a5c613cdb7919'
Notice: Applied catalog in 0.15 seconds
On Thu, Nov 10, 2016 at 05:03:17PM +0100, Fabrice Bacchella wrote:
> yes it works once removed.
>
> Le 10 nov. 2016 à 16:13, Rob Nelson <[1][email protected]> a écrit :
> I don't have an answer, but did you verify that when you remove the
> tilde, the resource applies properly? If so, this does sound like a bug
> of some sort.
> Rob Nelson
> [2][email protected]
> On Thu, Nov 10, 2016 at 9:16 AM, Fabrice Bacchella
> <[3][email protected]> wrote:
>
> I need a file called /etc/cron.hourly/~cronalive. I don't like the ~
> but don't have real choice here.
>
> So I defined the following resource:
>
> file{'/etc/cron.hourly/~cronalive':
> ....
> }
>
> But if fails with:
>
> Error: Could not set 'file' on ensure: user
> cronalive20161110-32243-1wx31rr doesn't exist at
> .../manifests/node.pp:35
>
> I think it resolve ~cronalive using shell resolution and looks for the
> homedir of this user. Is there any work around for that ? Adding a \
> create a file whose name starts with a \, using path =>
> '/etc/cron.hourly/~cronalive' gives the same result.
>
> --
> 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 [4][email protected].
> To view this discussion on the web visit
>
> [5]https://groups.google.com/d/msgid/puppet-users/A326124B-ACEA-43FB-A3A9-37107DD749F0%40orange.fr.
> For more options, visit [6]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:[email protected]
> 2. mailto:[email protected]
> 3. mailto:[email protected]
> 4. mailto:[email protected]
> 5.
> https://groups.google.com/d/msgid/puppet-users/A326124B-ACEA-43FB-A3A9-37107DD749F0%40orange.fr?utm_medium=email&utm_source=footer
> 6. 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/20161110164439.GA24818%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.