hubspotdevops / puppet-nexus

Puppet module for Sonatype Nexus
MIT License
24 stars 93 forks source link

Ensure 'etc' directory exists #102

Closed msutter closed 5 years ago

msutter commented 6 years ago

resolves following issue with nexus version 3.6.0 -> Error: Could not set 'present' on ensure: No such file or directory @ rb_sysopen - /srv/sonatype-work/nexus3/etc/nexus.properties at /etc/puppetlabs/code/environments/production/modules/nexus/manifests/config.pp:49

thaiphv commented 5 years ago

Please merge this pull request

thaiphv commented 5 years ago

I'm not sure who are the active maintainers of this project but @pranav can you take a look at this?

thaiphv commented 5 years ago

Thanks, @pranav.

thaiphv commented 5 years ago

Hmm. In fact this pull request doesn't work with nexus::nexus_work_dir_manage being set to true. At the same time, I don't why the README.md file mentioned that:

NOTE: If you wish to use Nexus 3, nexus_work_dir_manage need to be set to false because this module support only Nexus 3 installation I tried to install Nexus 3 and the following code worked for me:

class{ '::nexus':
version               => '3.14.0',
revision              => '04',
download_site         => 'https://download.sonatype.com/nexus/3',
nexus_type            => 'unix',
}

Unfortunately, it stopped working after I used this pull request. @pranav do you have any idea why?

efoncubierta commented 5 years ago

This PR breaks the nexus module, at least for me.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: File[/mnt/data/nexus/sonatype-work/nexus3/etc] is already declared in file /etc/puppet/modules/nexus/manifests/package.pp:117; cannot redeclare at /etc/puppet/modules/nexus/manifests/config.pp:54 on node manager.internal

This is how I am using it:

nexus::version: 2.11.4
nexus::nexus_root: /mnt/data/nexus
nexus::revision: '01'
nexus::nexus_work_recurse: false
pranav commented 5 years ago

Reverted for now