Skip to content

Commit 763ec35

Browse files
committed
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
1 parent 87d3812 commit 763ec35

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

manifests/plugins/ml2.pp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,26 +107,23 @@
107107
warning('Without networking mechanism driver, ml2 will not communicate with L2 agents')
108108
}
109109

110+
# In RH, the link is used to start Neutron process but in Debian,
111+
# it's used only to manage database synchronization.
112+
file {'/etc/neutron/plugin.ini':
113+
ensure => link,
114+
target => '/etc/neutron/plugins/ml2/ml2_conf.ini'
115+
}
116+
110117
# Some platforms do not have a dedicated ml2 plugin package
111-
# In RH, the link is used to start Neutron process but in Debian, it's used only
112-
# to manage database synchronization.
113118
if $::neutron::params::ml2_server_package {
114119
package { 'neutron-plugin-ml2':
115120
ensure => present,
116121
name => $::neutron::params::ml2_server_package,
117122
}
118123
Package['neutron-plugin-ml2'] -> Neutron_plugin_ml2<||>
119-
file {'/etc/neutron/plugin.ini':
120-
ensure => link,
121-
target => '/etc/neutron/plugins/ml2/ml2_conf.ini',
122-
require => Package['neutron-plugin-ml2']
123-
}
124+
Package['neutron-plugin-ml2'] -> File['/etc/neutron/plugin.ini']
124125
} else {
125-
file {'/etc/neutron/plugin.ini':
126-
ensure => link,
127-
target => '/etc/neutron/plugins/ml2/ml2_conf.ini',
128-
require => Package['neutron']
129-
}
126+
Package['neutron'] -> File['/etc/neutron/plugin.ini']
130127
}
131128

132129
neutron::plugins::ml2::driver { $type_drivers:

0 commit comments

Comments
 (0)