From 36b0b78550bfb2a2c8c86c7e3fa48a0cec6e0f67 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 24 Apr 2014 09:55:35 -0700 Subject: [PATCH] Gerrit: Ensure /opt/lib exists if used /opt/lib/git is about to become the new default path for the local replica. If it is used, we should make sure /opt/lib exists. Change-Id: I4accdfefce9ef4f98c435c11f08fded1481e3ee6 --- modules/gerrit/manifests/init.pp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/gerrit/manifests/init.pp b/modules/gerrit/manifests/init.pp index f2cb1d51ef..7498998f12 100644 --- a/modules/gerrit/manifests/init.pp +++ b/modules/gerrit/manifests/init.pp @@ -189,6 +189,14 @@ class gerrit( owner => 'gerrit2', } + if ((!defined(File['/opt/lib'])) + and ($replicate_path =~ /^\/opt\/lib\/.*$/)) { + file { '/opt/lib': + ensure => directory, + owner => root, + } + } + # Prepare gerrit directories. Even though some of these would be created # by the init command, we can go ahead and create them now and populate them. # That way the config files are already in place before init runs.