
This adds defined anchor points for external modules to hook into the software install, config and service dependency chain. This allows external modules to manage software installation (virtualenv, containers, etc) and service management (pacemaker) without needing rely on resources that may change or be renamed. Change-Id: Idb1332dd498bb3065720f2ccaf68e6b0e9fa80c3
72 lines
1.6 KiB
Puppet
72 lines
1.6 KiB
Puppet
# == Class: neutron::agents::bigswitch
|
|
#
|
|
# Installs and configures the Big Switch agent and lldp
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*package_ensure*]
|
|
# (optional) The state of the package
|
|
# Defaults to present
|
|
#
|
|
# [*lldp_enabled*]
|
|
# (optional) The state of the neutron-bsn-lldp service
|
|
# Defaults to true
|
|
#
|
|
# [*agent_enabled*]
|
|
# (optional) The state of the neutron-bsn-agent service
|
|
# Defaults to false
|
|
#
|
|
#
|
|
class neutron::agents::bigswitch (
|
|
$package_ensure = 'present',
|
|
$lldp_enabled = true,
|
|
$agent_enabled = false,
|
|
) {
|
|
|
|
include ::neutron::deps
|
|
|
|
if($::osfamily != 'Redhat') {
|
|
fail("Unsupported osfamily ${::osfamily}")
|
|
}
|
|
|
|
require ::neutron::plugins::ml2::bigswitch
|
|
|
|
package { 'bigswitch-lldp':
|
|
ensure => $package_ensure,
|
|
name => $::neutron::params::bigswitch_lldp_package,
|
|
tag => ['neutron-support-package', 'openstack'],
|
|
}
|
|
|
|
package { 'bigswitch-agent':
|
|
ensure => $package_ensure,
|
|
name => $::neutron::params::bigswitch_agent_package,
|
|
tag => ['neutron-support-package', 'openstack'],
|
|
}
|
|
|
|
if $lldp_enabled {
|
|
$lldp_service_ensure = 'running'
|
|
} else {
|
|
$lldp_service_ensure = 'stopped'
|
|
}
|
|
|
|
if $agent_enabled {
|
|
$agent_service_ensure = 'running'
|
|
} else {
|
|
$agent_service_ensure = 'stopped'
|
|
}
|
|
|
|
service { 'bigswitch-lldp':
|
|
ensure => $lldp_service_ensure,
|
|
name => $::neutron::params::bigswitch_lldp_service,
|
|
enable => $lldp_enabled,
|
|
tag => 'neutron-service',
|
|
}
|
|
|
|
service { 'bigswitch-agent':
|
|
ensure => $agent_service_ensure,
|
|
name => $::neutron::params::bigswitch_agent_service,
|
|
enable => $agent_enabled,
|
|
tag => 'neutron-service',
|
|
}
|
|
}
|