From 9ea03aea57f2dcaeccc886c3539e4b8a6e5940be Mon Sep 17 00:00:00 2001 From: Ivan Chavero Date: Mon, 7 Jul 2014 16:32:38 -0600 Subject: [PATCH] Fixes plugin.ini error When executing the cisco.pp manifest it throws an error if the plugin.ini file is already declared. Change-Id: Ibc9c8d343d86ffa8af74767ac6fbbd75cf03f45c --- manifests/plugins/cisco.pp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/manifests/plugins/cisco.pp b/manifests/plugins/cisco.pp index 54ceda579..44ab82351 100644 --- a/manifests/plugins/cisco.pp +++ b/manifests/plugins/cisco.pp @@ -171,9 +171,14 @@ # In RH, this link is used to start Neutron process but in Debian, it's used only # to manage database synchronization. - ensure_resource('file', '/etc/neutron/plugin.ini', { - ensure => link, - target => '/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini', - require => Package['neutron-plugin-ovs'] - }) + if defined(File['/etc/neutron/plugin.ini']) { + File <| path == '/etc/neutron/plugin.ini' |> { target => '/etc/neutron/plugins/cisco/cisco_plugins.ini' } + } + else { + file {'/etc/neutron/plugin.ini': + ensure => link, + target => '/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini', + require => Package['neutron-plugin-ovs'], + } + } }