Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contain classes #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Contain child classes
- found that when used with other modules ordering was difficult, mostly due to:

```
  File {
    require => Package['artifactory'],
  }
```
  This commit removes the blanket precedence statement and replaces it with
  explicit ordering and containment.
Nigel Gibbs committed Feb 13, 2018
commit b249125fdcac2e75aecd61b13d52e14de616580a
13 changes: 9 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -35,10 +35,15 @@
$backup_path = undef,
) {

include ::java
Class['::java']
-> Class['::artifactory::install']
-> Class['::artifactory::config']
-> Class['::artifactory::service']

contain '::java'
contain '::artifactory::install'
contain '::artifactory::config'
contain '::artifactory::service'

class { '::artifactory::install': } ->
class { '::artifactory::config': } ->
class { '::artifactory::service': }

}
11 changes: 6 additions & 5 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -13,10 +13,6 @@
fail("Use of private class ${name} by ${caller_module_name}")
}

File {
require => Package['artifactory'],
}

user { 'artifactory':
ensure => 'present',
system => true,
@@ -45,11 +41,16 @@
mode => '0775',
owner => artifactory,
group => artifactory,
before => Package['artifactory'],
}

file { '/var/opt/jfrog/artifactory/data':
ensure => link,
target => $::artifactory::data_path,
before => [
Package['artifactory'],
File[$::artifactory::data_path],
]
}
}

@@ -59,7 +60,7 @@
mode => '0775',
owner => artifactory,
group => artifactory,
before => Package['artifactory'],
}
}

}