aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorWojciech Dec <wdec@cisco.com>2018-01-30 14:35:45 +0100
committerFeng Pan <fpan@redhat.com>2018-06-10 21:19:52 -0400
commit2dd7507d2e7b1be052ad8301f951b50422ee51f0 (patch)
treebf78eeabba48e7615f087ec5f734d373abf39e72 /manifests
parent13398d85161374a062b958dbf30596b29b8629e5 (diff)
Change fdio repo configuration.
- Install repo config only when explicitly passed. This implies that when puppet-fdio is used stand alone, it is expected that user will supply a valid repo_branch parameter. Change-Id: Ic2485a66d4ce4fb921304a39fe65f79abed781f0 Signed-off-by: Wojciech Dec <wdec@cisco.com> Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp5
-rw-r--r--manifests/install.pp30
-rw-r--r--manifests/params.pp2
3 files changed, 21 insertions, 16 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 704a526..36c37a4 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -5,8 +5,9 @@
# === Parameters:
# [*repo_branch*]
# (optional) fd.io repo branch.
-# Valid values are 'release', 'master' and stable branch like 'stable.1609'.
-# Defaults to 'release'.
+# Valid values are undef, 'none', 'release', 'master' and stable branch like
+# 'stable.1609'. When set to undef or 'none', repo will not be installed.
+# Defaults to undef.
#
# [*vpp_exec_commands*]
# (optional) array of VPP startup exec commands
diff --git a/manifests/install.pp b/manifests/install.pp
index bad8ec4..7a30594 100644
--- a/manifests/install.pp
+++ b/manifests/install.pp
@@ -3,26 +3,30 @@
# Manages the installation of fdio.
#
class fdio::install {
- $base_url = $fdio::repo_branch ? {
- 'release' => 'https://nexus.fd.io/content/repositories/fd.io.centos7/',
- 'master' => 'https://nexus.fd.io/content/repositories/fd.io.master.centos7/',
- default => "https://nexus.fd.io/content/repositories/fd.io.${fdio::repo_branch}.centos7/",
- }
- # Add fdio's Yum repository
- yumrepo { "fdio-${fdio::repo_branch}":
- baseurl => $base_url,
- descr => "FD.io ${fdio::repo_branch} packages",
- enabled => 1,
- gpgcheck => 0,
+ if !empty($fdio::repo_branch) and $fdio::repo_branch != 'none' {
+ $base_url = $fdio::repo_branch ? {
+ 'release' => 'https://nexus.fd.io/content/repositories/fd.io.centos7/',
+ 'master' => 'https://nexus.fd.io/content/repositories/fd.io.master.centos7/',
+ default => "https://nexus.fd.io/content/repositories/fd.io.${fdio::repo_branch}.centos7/",
+ }
+
+ # Add fdio's Yum repository
+ yumrepo { "fdio-${fdio::repo_branch}":
+ baseurl => $base_url,
+ descr => "FD.io ${fdio::repo_branch} packages",
+ enabled => 1,
+ gpgcheck => 0,
+ notify => Package['vpp'],
+ }
}
# Install the VPP RPM
package { 'vpp':
- ensure => present,
- require => Yumrepo["fdio-${fdio::repo_branch}"],
+ ensure => present,
}
+
if $fdio::vpp_dpdk_support {
package { 'vpp-plugins':
ensure => present,
diff --git a/manifests/params.pp b/manifests/params.pp
index c312d88..70e4450 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -3,7 +3,7 @@
# This class manages the default params for the fdio class.
#
class fdio::params {
- $repo_branch = 'release'
+ $repo_branch = undef
$vpp_exec_commands = undef
$vpp_exec_file = '/etc/vpp/vpp-exec'
$vpp_dpdk_support = true