-
Notifications
You must be signed in to change notification settings - Fork 272
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
Refactor repository handling #815
Merged
+90
−162
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,43 @@ | ||
# @summary Configure the foreman repo | ||
# @api private | ||
# Configure the foreman repo | ||
# | ||
# @param repo | ||
# The repository version to manage. This can be a specific version or nightly | ||
# | ||
# @param configure_scl_repo | ||
# If disabled the SCL repo will not be configured on Red Hat clone systems. | ||
# (Currently only installs repos for CentOS and Scientific) | ||
# | ||
# @param gpgcheck | ||
# Turn on/off gpg check in repo files (effective only on RedHat family systems) | ||
# | ||
# @param scl_repo_ensure | ||
# The ensure to set on the SCL repo package | ||
# | ||
class foreman::repo( | ||
$repo = $foreman::repo, | ||
$gpgcheck = $foreman::gpgcheck, | ||
$configure_epel_repo = $foreman::configure_epel_repo, | ||
$configure_scl_repo = $foreman::configure_scl_repo, | ||
Optional[Variant[Enum['nightly'], Pattern['^\d+\.\d+$']]] $repo = undef, | ||
Boolean $gpgcheck = true, | ||
Boolean $configure_scl_repo = $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7', | ||
String $scl_repo_ensure = 'installed', | ||
) { | ||
if $repo { | ||
foreman::repos { 'foreman': | ||
repo => $repo, | ||
gpgcheck => $gpgcheck, | ||
before => Class['foreman::repos::extra'], | ||
before => Anchor['foreman::repo'], | ||
} | ||
|
||
if $configure_scl_repo { | ||
Foreman::Repos['foreman'] -> Package['foreman-release-scl'] | ||
} | ||
} | ||
|
||
class { 'foreman::repos::extra': | ||
configure_epel_repo => $configure_epel_repo, | ||
configure_scl_repo => $configure_scl_repo, | ||
if $configure_scl_repo { | ||
package {'foreman-release-scl': | ||
ensure => $scl_repo_ensure, | ||
before => Anchor['foreman::repo'], | ||
} | ||
} | ||
contain foreman::repos::extra | ||
|
||
# An anchor is used because it can be collected | ||
anchor { 'foreman::repo': } # lint:ignore:anchor_resource | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the intent to move this to centos-release-scl-rh instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I first want to merge it this way and rely on it. I want to drop
foreman-release-scl
in a separate PR but with this merged, I can at least start to clean up acceptance tests in puppet-foreman_proxy which will help with EL8.