Merge "Add the ability to disable setup_pip function"
This commit is contained in:
commit
fda5cfffe7
@ -16,6 +16,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
# NOTE(pabelanger): We now use the pip-and-virtualenv element from
|
||||||
|
# diskimage-builder to do this. Default to true for backwards compatibility.
|
||||||
|
SETUP_PIP=${SETUP_PIP:-true}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Distro identification functions
|
# Distro identification functions
|
||||||
@ -87,13 +90,16 @@ function setup_puppet_fedora {
|
|||||||
|
|
||||||
mkdir -p /etc/puppet/modules/
|
mkdir -p /etc/puppet/modules/
|
||||||
|
|
||||||
# Puppet expects the pip command named as pip-python on
|
if $SETUP_PIP; then
|
||||||
# Fedora, as per the packaged command name. However, we're
|
# Puppet expects the pip command named as pip-python on
|
||||||
# installing from get-pip.py so it's just 'pip'. An easy
|
# Fedora, as per the packaged command name. However, we're
|
||||||
# work-around is to just symlink pip-python to "fool" it.
|
# installing from get-pip.py so it's just 'pip'. An easy
|
||||||
# See upstream issue:
|
# work-around is to just symlink pip-python to "fool" it.
|
||||||
# https://tickets.puppetlabs.com/browse/PUP-1082
|
# See upstream issue:
|
||||||
ln -fs /usr/bin/pip /usr/bin/pip-python
|
# https://tickets.puppetlabs.com/browse/PUP-1082
|
||||||
|
ln -fs /usr/bin/pip /usr/bin/pip-python
|
||||||
|
fi
|
||||||
|
|
||||||
# Wipe out templatedir so we don't get warnings about it
|
# Wipe out templatedir so we don't get warnings about it
|
||||||
sed -i '/templatedir/d' /etc/puppet/puppet.conf
|
sed -i '/templatedir/d' /etc/puppet/puppet.conf
|
||||||
|
|
||||||
@ -150,8 +156,11 @@ EOF
|
|||||||
rpm -ivh $puppet_pkg
|
rpm -ivh $puppet_pkg
|
||||||
yum install -y puppet
|
yum install -y puppet
|
||||||
|
|
||||||
# see comments in setup_puppet_fedora
|
if $SETUP_PIP; then
|
||||||
ln -s /usr/bin/pip /usr/bin/pip-python
|
# see comments in setup_puppet_fedora
|
||||||
|
ln -s /usr/bin/pip /usr/bin/pip-python
|
||||||
|
fi
|
||||||
|
|
||||||
# Wipe out templatedir so we don't get warnings about it
|
# Wipe out templatedir so we don't get warnings about it
|
||||||
sed -i '/templatedir/d' /etc/puppet/puppet.conf
|
sed -i '/templatedir/d' /etc/puppet/puppet.conf
|
||||||
|
|
||||||
@ -284,7 +293,9 @@ function setup_pip {
|
|||||||
pip install -U setuptools
|
pip install -U setuptools
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_pip
|
if $SETUP_PIP; then
|
||||||
|
setup_pip
|
||||||
|
fi
|
||||||
|
|
||||||
if is_fedora; then
|
if is_fedora; then
|
||||||
setup_puppet_fedora
|
setup_puppet_fedora
|
||||||
|
Loading…
Reference in New Issue
Block a user