From 763ec3527e0985358828cf8b9fe2d47fbaa29a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Gagne=CC=81?= Date: Thu, 3 Jul 2014 19:16:50 -0400 Subject: [PATCH] Simplify ml2_config.ini symlink resource management Move file resource outside conditional so it's managed once and manage dependencies in conditional instead. Change-Id: I56b30173db4a56cf3ad211a9656c628977eec99b --- manifests/plugins/ml2.pp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/manifests/plugins/ml2.pp b/manifests/plugins/ml2.pp index afbde79fe..fb8b4c02c 100644 --- a/manifests/plugins/ml2.pp +++ b/manifests/plugins/ml2.pp @@ -107,26 +107,23 @@ warning('Without networking mechanism driver, ml2 will not communicate with L2 agents') } + # In RH, the link is used to start Neutron process but in Debian, + # it's used only to manage database synchronization. + file {'/etc/neutron/plugin.ini': + ensure => link, + target => '/etc/neutron/plugins/ml2/ml2_conf.ini' + } + # Some platforms do not have a dedicated ml2 plugin package - # In RH, the link is used to start Neutron process but in Debian, it's used only - # to manage database synchronization. if $::neutron::params::ml2_server_package { package { 'neutron-plugin-ml2': ensure => present, name => $::neutron::params::ml2_server_package, } Package['neutron-plugin-ml2'] -> Neutron_plugin_ml2<||> - file {'/etc/neutron/plugin.ini': - ensure => link, - target => '/etc/neutron/plugins/ml2/ml2_conf.ini', - require => Package['neutron-plugin-ml2'] - } + Package['neutron-plugin-ml2'] -> File['/etc/neutron/plugin.ini'] } else { - file {'/etc/neutron/plugin.ini': - ensure => link, - target => '/etc/neutron/plugins/ml2/ml2_conf.ini', - require => Package['neutron'] - } + Package['neutron'] -> File['/etc/neutron/plugin.ini'] } neutron::plugins::ml2::driver { $type_drivers: