Fix CI
[integration/packaging/puppet-opendaylight.git] / manifests / config.pp
index e7d8ea80732ae11d91114d3a3fe3efe5d885a80d..b20b5c93f958c0f2f3ff79bf8521c4185ca1f75b 100644 (file)
@@ -63,16 +63,58 @@ class opendaylight::config {
         # Set user:group owners
         owner  => 'odl',
         group  => 'odl',
+        source => 'puppet:///modules/opendaylight/jolokia.xml',
       }
 
       # Configure ODL OSVDB Clustering
       $ha_node_ip_str = join($::opendaylight::ha_node_ips, ' ')
       exec { 'Configure ODL OVSDB Clustering':
         command => "configure_cluster.sh ${::opendaylight::ha_node_index} ${ha_node_ip_str}",
-        path    => '/opt/opendaylight/bin/',
+        path    => '/opt/opendaylight/bin/:/usr/sbin:/usr/bin:/sbin:/bin',
+        creates => '/opt/opendaylight/configuration/initial/akka.conf'
       }
     } else {
       fail("Number of HA nodes less than 2: ${ha_node_count} and HA Enabled")
     }
   }
+
+  # Configure ACL security group
+  # Requires at least CentOS 7.3 for RHEL/CentOS systems
+  if ('odl-netvirt-openstack' in $opendaylight::features) {
+    if $opendaylight::security_group_mode == 'stateful' {
+      if defined('$opendaylight::stateful_unsupported') {
+        if $opendaylight::stateful_unsupported {
+          warning("Stateful is unsupported in ${::operatingsystemrelease} setting to 'learn'")
+          $sg_mode = 'learn'
+        } else {
+            $sg_mode = 'learn'
+        }
+      } else {
+        $sg_mode = 'stateful'
+      }
+    } else {
+      $sg_mode = $opendaylight::security_group_mode
+    }
+
+    $odl_datastore = [
+      '/opt/opendaylight/etc/opendaylight', '/opt/opendaylight/etc/opendaylight/datastore',
+      '/opt/opendaylight/etc/opendaylight/datastore/initial',
+      '/opt/opendaylight/etc/opendaylight/datastore/initial/config',
+    ]
+
+    file { $odl_datastore:
+      ensure => directory,
+      mode   => '0755',
+      owner  => 'odl',
+      group  => 'odl',
+    }
+    ->
+    file { 'netvirt-aclservice-config.xml':
+      ensure  => file,
+      path    => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-aclservice-config.xml',
+      owner   => 'odl',
+      group   => 'odl',
+      content => template('opendaylight/netvirt-aclservice-config.xml.erb'),
+    }
+  }
 }