| I think this may only be an issue if confdir is a dangling symlink or if the symlink points to a file. If I create a symlink pointing to a directory:
$ bx puppet apply -e "file { '$HOME/.puppetlabs/etc/puppet-target': ensure => directory }; file { '$HOME/.puppetlabs/etc/puppet-conf': ensure => link, target => '$HOME/.puppetlabs/etc/puppet-target' }" |
... |
$ ls -la ~/.puppetlabs/etc/puppet-conf |
lrwxr-xr-x 1 josh staff 41B May 15 13:21 /Users/josh/.puppetlabs/etc/puppet-conf@ -> /Users/josh/.puppetlabs/etc/puppet-target |
$ ls -la ~/.puppetlabs/etc/puppet-conf/ |
total 0 |
drwxr-xr-x 2 josh staff 64B May 15 13:20 ./ |
drwxr-xr-x 6 josh staff 192B May 15 13:21 ../
|
Then puppet runs ok and resolves the confdir:
$ bx puppet apply -e 'notice($settings::confdir)' --confdir $HOME/.puppetlabs/etc/puppet-conf |
Notice: Scope(Class[main]): /Users/josh/.puppetlabs/etc/puppet-conf
|
But if I delete the target of the symlink then it blows up:
$ rm -rf /Users/josh/.puppetlabs/etc/puppet-target |
$ bx puppet apply -e "" --confdir $HOME/.puppetlabs/etc/puppet-conf |
Error: Could not set 'directory' on ensure: File exists @ dir_s_mkdir - /Users/josh/.puppetlabs/etc/puppet-conf |
...
|
I wouldn't expect puppet settings to try to recover from a dangling symlink, so I'd be fine closing this, unless there's some JRuby issue? |