Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Cannot use before or require against the yum class #164

Open
critch opened this issue Sep 6, 2016 · 0 comments
Open

Cannot use before or require against the yum class #164

critch opened this issue Sep 6, 2016 · 0 comments

Comments

@critch
Copy link

critch commented Sep 6, 2016

Expected Behavior

Expected class{'yum': before => Package['example']} would ensure the yum repos are installed before puppet attempted to run the install for the package. Similarly, would expect anything requiring the Class['yum'] node would work as expected as well.

Actual Behavior

Due to the use of include and many subclasses, any action against Class['yum'] doesn't cause the desired effect of ensuring that yum is configured before other desired actions.

Steps to Reproduce the Problem

  1. Make a catalog that includes a new package available from a yet to be configured repo.
  2. Also include the new repo, and add a dependency from one or the other direction from a package to the Class['yum'].
  3. When applying the catalog, you may or may not get the desired ordering.

Suggested fix

Change the various include statements to contain so all the subclasses are finished before the Class['yum'] is finished. This allows the desired effect of
class{'yum':
before => Package['example']
}

alvagante added a commit that referenced this issue Sep 9, 2016
PR for issue #164, Change include to contain for better encapsulation
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant