-
Notifications
You must be signed in to change notification settings - Fork 271
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
Pre-install foreman-selinux in acceptance environment #1041
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3,11 +3,18 @@ | |||||
} | ||||||
|
||||||
# Needed for idempotency when SELinux is enabled | ||||||
if $foreman::repo::configure_scl_repo { | ||||||
package { 'rh-redis5-redis': | ||||||
ensure => installed, | ||||||
if $facts['os']['selinux']['enabled'] { | ||||||
package { 'foreman-selinux': | ||||||
ensure => latest, | ||||||
require => Class['foreman::repo'], | ||||||
} | ||||||
|
||||||
if $foreman::repo::configure_scl_repo { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
package { 'rh-redis5-redis': | ||||||
ensure => installed, | ||||||
require => Class['foreman::repo'], | ||||||
} | ||||||
} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whole block is indented too far I think. And you'll have a trailing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was my intention to have the IMO it was an oversight that this wasn't already conditioned on selinux being enabled. I thought about making the change in a separate commit but it seemed too minor to warrant it. That would have made this easier to review but probably the git log clutter is not worth it when this only affects tests. What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That works. Can you rebase on latest master branch to ensure tests pass? |
||||||
} | ||||||
|
||||||
# Not /etc/foreman because purging removes that | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
def purge_foreman | ||
case fact('osfamily') | ||
when 'RedHat' | ||
on default, 'yum -y remove foreman* tfm-*' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't there a way to exclude a package in yum/dnf remove? |
||
on default, 'rpm -qa | grep -P \'^tfm|^foreman(?!-selinux)\' | xargs yum -y remove' | ||
when 'Debian' | ||
on default, 'apt-get purge -y foreman*', { :acceptable_exit_codes => [0, 100] } | ||
on default, 'apt-get purge -y ruby-hammer-cli-*', { :acceptable_exit_codes => [0, 100] } | ||
|
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.