Skip to content

Use contain instead of anchor pattern#627

Merged
mmoll merged 2 commits intotheforeman:masterfrom
alexjfisher:remove_anchors
Aug 28, 2018
Merged

Use contain instead of anchor pattern#627
mmoll merged 2 commits intotheforeman:masterfrom
alexjfisher:remove_anchors

Conversation

@alexjfisher
Copy link
Copy Markdown
Contributor

No description provided.

This change has already been made in foreman-installer-modulesync.
Copy link
Copy Markdown
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still a bit unclear about whether class {} implies contain or if it doesn't. Given the old code also used anchors with class {} I think this is fine even if it does turn out to be redundant.

@mmoll mmoll merged commit acdca66 into theforeman:master Aug 28, 2018
@mmoll
Copy link
Copy Markdown
Contributor

mmoll commented Aug 28, 2018

merged, thanks @alexjfisher!

@alexjfisher
Copy link
Copy Markdown
Contributor Author

@ekohl classes aren’t implicitly contained when you use class {}

https://puppet.com/docs/puppet/5.5/lang_containment.html#the-contain-function

To contain classes that are declared with the resource-like declaration syntax, use the contain function after declaring the class

@ekohl
Copy link
Copy Markdown
Member

ekohl commented Aug 29, 2018

@alexjfisher Thanks, that's great to get confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants