voxpupuli / puppet-rundeck

Module for managing the installatation and configuration of the rundeck orchestration tool
https://forge.puppet.com/puppet/rundeck
MIT License
39 stars 129 forks source link

Creating the home dir is now optional #379

Closed houtmanj closed 6 years ago

houtmanj commented 6 years ago

manage_home will determine if the home directory is managed.

Usefull for us, because we needed to bind mount the homedir. This meant that the mount and directory needed to exist before executing the rundeck module.

bastelfreak commented 6 years ago

Hi @houtmanj, thanks for the PR. Can you add a spec test that sets the parameter to false and verifies that the resource isn't in the catalog? Please also take a look at the used email adress in the commit, it isn't associated with your github account.

houtmanj commented 6 years ago

hi @bastelfreak, Sure, but i am unsure on how to implement the test ? A File{'/var/lib/rundeck':} resource remains necessary in the code surrounding the module. So the unit test should have that, when testing with manage_home.

Something like: Test success: File{'/var/lib/rundeck': ensure => directory } class { 'rundeck': manage_home => false } Test if dependency exists.

Test fails: class { 'rundeck': manage_home => false } Test compilation fails on missing File{'/var/lib/rundeck': ensure => directory }

Any hints?

houtmanj commented 6 years ago

@bastelfreak I've got something, could you review the work?

bastelfreak commented 6 years ago

Thanks @houtmanj !