Add "direct" option for logging to console.
[integration/packaging/puppet-opendaylight.git] / manifests / install.pp
index d3e3eb1daa7def974d4087dd3316b2a1554ced8a..e8cd8d89b897c213355d23e02f3f603666527faf 100644 (file)
@@ -1,28 +1,18 @@
 # == Class opendaylight::install
 #
-# This class is called from opendaylight for install.
+# Manages the installation of OpenDaylight.
+#
+# There are two install methods: RPM-based and deb-based. The resulting
+# system state should be functionally equivalent.
 #
 class opendaylight::install {
-  $base_url = $::operatingsystem ? {
-    'CentOS' => 'https://copr-be.cloud.fedoraproject.org/results/dfarrell07/OpenDaylight/epel-7-$basearch/',
-    'Fedora' => 'https://copr-be.cloud.fedoraproject.org/results/dfarrell07/OpenDaylight/fedora-$releasever-$basearch/',
-  }
 
-  yumrepo { 'opendaylight':
-    # 'ensure' isn't supported with Puppet <3.5
-    # hopfully it defaults to present, but docs don't say
-    # https://docs.puppetlabs.com/references/3.4.0/type.html#yumrepo
-    # https://docs.puppetlabs.com/references/3.5.0/type.html#yumrepo
-    #ensure  => 'present',
-    baseurl  => $base_url,
-    descr    => 'OpenDaylight SDN controller',
-    gpgcheck => 0,
-    enabled  => 1,
-    before   => Package['opendaylight'],
+  if $::opendaylight::manage_repositories {
+    require ::opendaylight::repos
   }
 
-  package { $::opendaylight::package_name:
+  package { 'opendaylight':
     ensure  => present,
-    require => Yumrepo['opendaylight'],
   }
+
 }