Re: [Puppet Users] Getting the location of the manifest file

2021-08-27 Thread Go Iwai
Hello Ben, On Wednesday, August 18, 2021 at 2:25:19 AM UTC+9 Ben Ford wrote: > Hiera provides an environment hierarchy. Is that what you're looking for? > https://puppet.com/docs/puppet/latest/hiera_config_yaml_5.html > No, it is not. I know that the environmental hierarchy provided by hiera

Re: [Puppet Users] Getting the location of the manifest file

2021-08-17 Thread Ben Ford
Hiera provides an environment hierarchy. Is that what you're looking for? https://puppet.com/docs/puppet/latest/hiera_config_yaml_5.html On Mon, Aug 16, 2021 at 7:33 PM Go Iwai wrote: > Hello Martin, > > Let's say we have three directories: > > preproduction/ preproduction/ private/ > > There

Re: [Puppet Users] Getting the location of the manifest file

2021-08-16 Thread Go Iwai
Hello Martin, Let's say we have three directories: preproduction/ preproduction/ private/ There are different manifest files saved in the same name, like service-deploy.pp. In the manifest service-deploy.pp, I want to get the absolute path to itself, then determine the variable of env like:

Re: [Puppet Users] Getting the location of the manifest file

2021-08-16 Thread Ben Ford
Hi Go! I'm not sure what you're trying to accomplish, but you'd probably be better off locating your code in a module on your modulepath and then Puppet takes care of all the relative paths for you. https://puppet.com/docs/puppet/latest/modules_fundamentals.html On Mon, Aug 16, 2021 at 3:53 AM

Re: [Puppet Users] Getting the location of the manifest file

2021-08-16 Thread Martin Alfke
Hi Go, what do you want to achieve? When using puppet apply, a manifest can be anywhere on the filesystem. Best, Martin > On 16. Aug 2021, at 03:18, Go Iwai wrote: > > Hello, > > I want to know the location where puppet-apply locally applied the > manifest file. > > $ pwd >