Skip to content

Commit

Permalink
ensure needed order for RedHat acceptance tests
Browse files Browse the repository at this point in the history
* use contain instead of class calls to inherit depencies to subclasses

closes #45
  • Loading branch information
cruelsmith committed Sep 24, 2024
1 parent 329af79 commit 82673af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@
Optional[Stdlib::Filesource] $authgroupfile_source = undef,
Optional[Stdlib::Absolutepath] $prefix = undef,
) {
class { 'proftpd::install': }
-> class { 'proftpd::config': }
~> class { 'proftpd::service': }
contain proftpd::install
contain proftpd::config
contain proftpd::service
Class['proftpd::install'] -> Class['proftpd::config'] ~> Class['proftpd::service']

if $load_modules {
create_resources(proftpd::module, $load_modules, {})
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/proftpd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
pp = <<-EOS
if $facts['os']['family'] == 'RedHat' {
include epel
Class['epel'] -> Class['proftpd']
}
class { 'proftpd': }
EOS
Expand Down

0 comments on commit 82673af

Please sign in to comment.