changeset 148:d9fcabc75a1e puppet-3.6

Fix pip installations We didn't specify Pip package before so we couldn't bootstrap from cold. Also, and Pip is too clever. If package name is wrong but close enough, Pip installs it anyway but next run Puppet can't find the package because of typo and tells Pip to install it again!
author IBBoard <dev@ibboard.co.uk>
date Sun, 26 Mar 2017 16:12:57 +0100
parents 6cb6dc1f74d4
children af30a5eb468f
files manifests/templates.pp modules/vcs/manifests/init.pp
diffstat 2 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Sat Mar 25 20:54:34 2017 +0000
+++ b/manifests/templates.pp	Sun Mar 26 16:12:57 2017 +0100
@@ -22,11 +22,6 @@
 :hierarchy: common
 :logger: console",
 	}
-	# Fudge Pip to exist
-	file { '/usr/bin/pip-python':
-		ensure => link,
-		target => '/usr/bin/pip',
-	} -> Package <| provider == 'pip' |>
 }
 
 class basevpsnode (
@@ -235,6 +230,16 @@
 		source => 'puppet:///common/RPM-GPG-KEY-webtatic-el7',
 		before => YumRepo['webtatic'],
 	}
+
+	# Install Pip and symlink it so we can use it as a package provider
+	package { 'python2-pip':
+		ensure => installed;
+	}
+	->
+	file { '/usr/bin/pip-python':
+		ensure => link,
+		target => '/usr/bin/pip',
+	} -> Package <| provider == 'pip' |>
 }
 
 class tools {
--- a/modules/vcs/manifests/init.pp	Sat Mar 25 20:54:34 2017 +0000
+++ b/modules/vcs/manifests/init.pp	Sun Mar 26 16:12:57 2017 +0100
@@ -5,7 +5,7 @@
         ]:
         ensure => installed
     }
-    @package { 'mercurial_keyring':
+    @package { 'mercurial-keyring':
         ensure => installed,
         provider => 'pip',
     }
@@ -13,7 +13,7 @@
 
 class vcs::client inherits vcs {
 	realize(Package["mercurial"],
-		Package["mercurial_keyring"],
+		Package["mercurial-keyring"],
 		Package["git"])
 }