bstopp / puppet-aem

Puppet module for managing AEM Installations.
https://forge.puppet.com/bstopp/aem
Apache License 2.0
30 stars 30 forks source link

aem::config always reserves resource File["${home}/crx-quickstart/install"] #134

Closed mbloch1986 closed 4 years ago

mbloch1986 commented 4 years ago

Hello,

I'm trying to use the aem::config manifest in my manifests to reset the start & start-env files in crx-quickstart/bin back to the original one. But unfortunatley the aem::config is calling the resource file {"${home}/crx-quickstart/install"

https://github.com/bstopp/puppet-aem/blob/master/manifests/config.pp#L53

which I also use in my manifests.

Do you have any opinion about this process ?

I can think of introducing a new parameter to enable/disable managing the install directory or adding a check to only call the resource if not defined somewhere else. Similar how the home dir is managed

https://github.com/bstopp/puppet-aem/blob/master/manifests/package.pp#L28

.

Thanks Michael

henrykuijpers commented 4 years ago

You could also label the resource differently, maybe? I.e. let aem::config be responsible for the install-folder, but have your own script use a different label for the resource (i.e. "project name - manage env scripts - ${home}/crx-quickstart-install"

mbloch1986 commented 4 years ago

@henrykuijpers I don't think this is possible because the path parameter is a namevar and if you don't provide the path parameter than the resource title is used as namevar.

bstopp commented 4 years ago

This module is intended to own the crx-quickstart and all of its contents. The home directory option is there in case someone wants to manage their license or some other home folder content separately.

If you are trying to put content into the install folder, you should be able to specify any file which you want to exist there, and it will auto-require the install folder.

If for some reason the auto-require isn't working, you can specify it explicitly and it will ensure your resources are ordered via a require => File[/path/to/home/install] (but proper Containment should not require this.)

All that being said - you mentioned also manipulating the start and start-env files - is there something not covered in my templates that you're looking for? I'd be happy to review those needs in a different issue/PR.