Ryan Lane has submitted this change and it was merged.

Change subject: Call apt-get update after adding a new apt repo
......................................................................


Call apt-get update after adding a new apt repo

Previously the apt-get update was only happening on subsequent
puppet runs.  For openstack that was too late as the packages
were already installed from the wrong repo.

Change-Id: Ib057bb9bdf0cca961d2091ca6ea6da59ae9ed5c0
---
M manifests/openstack.pp
M modules/apt/manifests/update.pp
2 files changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Ryan Lane: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/openstack.pp b/manifests/openstack.pp
index b0271c2..ba32a0c 100644
--- a/manifests/openstack.pp
+++ b/manifests/openstack.pp
@@ -128,6 +128,8 @@
                        components => 'main',
                        keyfile    => 'puppet:///files/misc/ubuntu-cloud.key';
                }
+
+               include apt::updatefornewrepo
        }
 }
 
diff --git a/modules/apt/manifests/update.pp b/modules/apt/manifests/update.pp
index 9b04600..4c2857a 100644
--- a/modules/apt/manifests/update.pp
+++ b/modules/apt/manifests/update.pp
@@ -4,3 +4,13 @@
                returns => [ 0, 100 ];
        }
 }
+
+class apt::updatefornewrepo {
+    exec { 'update-for-new-repo':
+               command => '/usr/bin/apt-get update',
+        timeout => 240,
+        returns => [ 0, 100 ];
+    }
+}
+
+Apt::Repository <| |> -> Class['apt::updatefornewrepo']

-- 
To view, visit https://gerrit.wikimedia.org/r/64995
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib057bb9bdf0cca961d2091ca6ea6da59ae9ed5c0
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Faidon <[email protected]>
Gerrit-Reviewer: Ryan Lane <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to