diff --git a/modules/openstack_project/files/pip.conf b/modules/openstack_project/files/pip.conf deleted file mode 100644 index 70e5de85b7..0000000000 --- a/modules/openstack_project/files/pip.conf +++ /dev/null @@ -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 diff --git a/modules/openstack_project/manifests/server.pp b/modules/openstack_project/manifests/server.pp index adca9423b2..b0ae40c9b4 100644 --- a/modules/openstack_project/manifests/server.pp +++ b/modules/openstack_project/manifests/server.pp @@ -13,6 +13,13 @@ class openstack_project::server ( $afs = false, $puppetmaster_server = 'puppetmaster.openstack.org', $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': iptables_public_tcp_ports => $iptables_public_tcp_ports, @@ -26,5 +33,7 @@ class openstack_project::server ( afs => $afs, manage_exim => $manage_exim, sysadmins => $sysadmins, + pypi_index_url => $pypi_index_url, + pypi_trusted_hosts => $pypi_trusted_hosts, } } diff --git a/modules/openstack_project/manifests/template.pp b/modules/openstack_project/manifests/template.pp index e2003ac55b..3f6a8c5c9a 100644 --- a/modules/openstack_project/manifests/template.pp +++ b/modules/openstack_project/manifests/template.pp @@ -18,6 +18,13 @@ class openstack_project::template ( $puppetmaster_server = 'puppetmaster.openstack.org', $manage_exim = false, $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', + ], ) { ########################################################### @@ -200,8 +207,11 @@ class openstack_project::template ( ########################################################### # Manage python/pip - include pip $desired_virtualenv = '13.1.0' + class { '::pip': + index_url => $pypi_index_url, + trusted_hosts => $pypi_trusted_hosts, + } if (( versioncmp($::virtualenv_version, $desired_virtualenv) < 0 )) { $virtualenv_ensure = $desired_virtualenv @@ -213,13 +223,6 @@ class openstack_project::template ( provider => 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