Skip to content

Commit f340ecf

Browse files
wbclarkehelms
authored andcommitted
Pre-install foreman-selinux in acceptance environment
Also do not purge foreman-selinux between tests. This is a workaround for the Puppet issue [PUP-10548].
1 parent 1d28765 commit f340ecf

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

spec/setup_acceptance_node.pp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@
33
}
44

55
# Needed for idempotency when SELinux is enabled
6-
if $foreman::repo::configure_scl_repo {
7-
package { 'rh-redis5-redis':
8-
ensure => installed,
6+
if $facts['os']['selinux']['enabled'] {
7+
package { 'foreman-selinux':
8+
ensure => latest,
99
require => Class['foreman::repo'],
1010
}
11+
12+
if $foreman::repo::configure_scl_repo {
13+
package { 'rh-redis5-redis':
14+
ensure => installed,
15+
require => Class['foreman::repo'],
16+
}
17+
}
1118
}
1219

1320
# Not /etc/foreman because purging removes that

spec/support/acceptance/purge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def purge_foreman
22
case fact('osfamily')
33
when 'RedHat'
4-
on default, 'yum -y remove foreman* tfm-*'
4+
on default, 'rpm -qa | grep -P \'^tfm|^foreman(?!-selinux)\' | xargs yum -y remove'
55
when 'Debian'
66
on default, 'apt-get purge -y foreman*', { :acceptable_exit_codes => [0, 100] }
77
on default, 'apt-get purge -y ruby-hammer-cli-*', { :acceptable_exit_codes => [0, 100] }

0 commit comments

Comments
 (0)