blob: 3ca1d66e4491f1e1bb8bb86f913bb9a16aa86c15 [file] [log] [blame]
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
class hdp2::testing_env_patch()
{
$cmd = "mkdir /tmp/repos; mv /etc/yum.repos.d/* /tmp/repos"
$repo_target = "/etc/yum.repos.d/${hdp2::params::hdp_yum_repo}"
anchor { 'hdp2::testing_env_patch::begin' :}
class{ 'hdp2::iptables':
ensure => stopped,
require => Anchor['hdp2::testing_env_patch::begin']
}
exec { '/bin/echo 0 > /selinux/enforce':
require => Class['hdp2::iptables']
}
hdp2::testing_env_patch::packages { 'common' :
require => Exec['/bin/echo 0 > /selinux/enforce']
}
hdp2::exec { $cmd :
command => $cmd,
unless => "test -e ${repo_target}",
require => Hdp2::Testing_env_patch::Packages['common']
}
anchor { 'hdp2::testing_env_patch::end' :
require => Exec[$cmd]
}
}
define hdp2::testing_env_patch::packages(
$needed = false)
{
if ($needed == true) {
package { ['perl-Digest-HMAC','perl-Socket6','perl-Crypt-DES','xorg-x11-fonts-Type1','libdbi'] :}
}
}