Don't hardcode pip.conf values
In the same line as other changes, move settings of config file to template, and expose the settings on manifest, so it can be easily configurable. Depends-On: I78962555c9a9ec1a96ce19810a463a5d619b04f9 Change-Id: I673c9c177bf2fdb3e6428e3ad4252ee76b53309c
This commit is contained in:
parent
981ae01a8f
commit
ceecfb843b
@ -1,7 +0,0 @@
|
|||||||
[global]
|
|
||||||
index-url = https://pypi.python.org/simple
|
|
||||||
trusted-host =
|
|
||||||
pypi.dfw.openstack.org
|
|
||||||
pypi.iad.openstack.org
|
|
||||||
pypi.ord.openstack.org
|
|
||||||
pypi.region-b.geo-1.openstack.org
|
|
@ -13,6 +13,13 @@ class openstack_project::server (
|
|||||||
$afs = false,
|
$afs = false,
|
||||||
$puppetmaster_server = 'puppetmaster.openstack.org',
|
$puppetmaster_server = 'puppetmaster.openstack.org',
|
||||||
$manage_exim = true,
|
$manage_exim = true,
|
||||||
|
$pypi_index_url = 'https://pypi.python.org/simple',
|
||||||
|
$pypi_trusted_hosts = [
|
||||||
|
'pypi.dwf.openstack.org',
|
||||||
|
'pypi.iad.openstack.org',
|
||||||
|
'pypi.ord.openstack.org',
|
||||||
|
'pypi.region-b.geo-1.openstack.org',
|
||||||
|
],
|
||||||
) {
|
) {
|
||||||
class { 'openstack_project::template':
|
class { 'openstack_project::template':
|
||||||
iptables_public_tcp_ports => $iptables_public_tcp_ports,
|
iptables_public_tcp_ports => $iptables_public_tcp_ports,
|
||||||
@ -26,5 +33,7 @@ class openstack_project::server (
|
|||||||
afs => $afs,
|
afs => $afs,
|
||||||
manage_exim => $manage_exim,
|
manage_exim => $manage_exim,
|
||||||
sysadmins => $sysadmins,
|
sysadmins => $sysadmins,
|
||||||
|
pypi_index_url => $pypi_index_url,
|
||||||
|
pypi_trusted_hosts => $pypi_trusted_hosts,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,13 @@ class openstack_project::template (
|
|||||||
$puppetmaster_server = 'puppetmaster.openstack.org',
|
$puppetmaster_server = 'puppetmaster.openstack.org',
|
||||||
$manage_exim = false,
|
$manage_exim = false,
|
||||||
$sysadmins = [],
|
$sysadmins = [],
|
||||||
|
$pypi_index_url = 'https://pypi.python.org/simple',
|
||||||
|
$pypi_trusted_hosts = [
|
||||||
|
'pypi.dwf.openstack.org',
|
||||||
|
'pypi.iad.openstack.org',
|
||||||
|
'pypi.ord.openstack.org',
|
||||||
|
'pypi.region-b.geo-1.openstack.org',
|
||||||
|
],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
@ -196,8 +203,11 @@ class openstack_project::template (
|
|||||||
###########################################################
|
###########################################################
|
||||||
# Manage python/pip
|
# Manage python/pip
|
||||||
|
|
||||||
include pip
|
|
||||||
$desired_virtualenv = '13.1.0'
|
$desired_virtualenv = '13.1.0'
|
||||||
|
class { '::pip':
|
||||||
|
index_url => $pypi_index_url,
|
||||||
|
trusted_hosts => $pypi_trusted_hosts,
|
||||||
|
}
|
||||||
|
|
||||||
if (( versioncmp($::virtualenv_version, $desired_virtualenv) < 0 )) {
|
if (( versioncmp($::virtualenv_version, $desired_virtualenv) < 0 )) {
|
||||||
$virtualenv_ensure = $desired_virtualenv
|
$virtualenv_ensure = $desired_virtualenv
|
||||||
@ -209,13 +219,6 @@ class openstack_project::template (
|
|||||||
provider => pip,
|
provider => pip,
|
||||||
require => Class['pip'],
|
require => Class['pip'],
|
||||||
}
|
}
|
||||||
file { '/etc/pip.conf':
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0444',
|
|
||||||
source => 'puppet:///modules/openstack_project/pip.conf',
|
|
||||||
replace => true,
|
|
||||||
}
|
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
# Manage Root ssh
|
# Manage Root ssh
|
||||||
|
Loading…
Reference in New Issue
Block a user