diff --git a/fixtures/scenario001.pp b/fixtures/scenario001.pp index c5f3e237a..c38ea9c95 100644 --- a/fixtures/scenario001.pp +++ b/fixtures/scenario001.pp @@ -15,7 +15,6 @@ # include ::openstack_integration -include ::openstack_integration::repos include ::openstack_integration::rabbitmq include ::openstack_integration::mysql include ::openstack_integration::keystone diff --git a/fixtures/scenario002.pp b/fixtures/scenario002.pp index e2d6992c0..48744d71b 100644 --- a/fixtures/scenario002.pp +++ b/fixtures/scenario002.pp @@ -15,7 +15,6 @@ # include ::openstack_integration -include ::openstack_integration::repos include ::openstack_integration::rabbitmq include ::openstack_integration::mysql include ::openstack_integration::keystone diff --git a/fixtures/scenario003.pp b/fixtures/scenario003.pp index 9628a179b..d7f7f8c19 100644 --- a/fixtures/scenario003.pp +++ b/fixtures/scenario003.pp @@ -15,7 +15,6 @@ # include ::openstack_integration -include ::openstack_integration::repos include ::openstack_integration::rabbitmq include ::openstack_integration::mysql include ::openstack_integration::keystone diff --git a/manifests/init.pp b/manifests/init.pp index 1847d1e32..749c6a077 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -2,4 +2,9 @@ class openstack_integration { Exec { logoutput => 'on_failure' } + if $::osfamily == 'RedHat' { + package { 'openstack-selinux': + ensure => 'latest' + } + } } diff --git a/manifests/repos.pp b/manifests/repos.pp index fd01d3324..6f8e0a501 100644 --- a/manifests/repos.pp +++ b/manifests/repos.pp @@ -7,14 +7,11 @@ class openstack_integration::repos { release => 'liberty', package_require => true, } - $package_provider = 'apt' } 'RedHat': { class { '::openstack_extras::repo::redhat::redhat': release => 'liberty', } - package { 'openstack-selinux': ensure => 'latest' } - $package_provider = 'yum' } default: { fail("Unsupported osfamily (${::osfamily})") diff --git a/run_tests.sh b/run_tests.sh index cb5a6c870..8a4470550 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -14,6 +14,7 @@ # under the License. export SCENARIO=${SCENARIO:-scenario001} +export MANAGE_REPOS=${MANAGE_REPOS:-true} export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) source $SCRIPT_DIR/functions @@ -43,7 +44,6 @@ PUPPET_ARGS="--detailed-exitcodes --verbose --color=false --debug" function run_puppet() { local manifest=$1 - $SUDO puppet apply $PUPPET_ARGS fixtures/${manifest}.pp local res=$? @@ -70,6 +70,9 @@ fi # Run puppet and assert something changes. set +e +if [ "${MANAGE_REPOS}" = true ]; then + $SUDO puppet apply $PUPPET_ARGS -e "include ::openstack_integration::repos" +fi run_puppet $SCENARIO RESULT=$? set -e