Uses file extension .instance for instance files in /opt/plnxtools/ads

This commit is contained in:
7u83 2020-07-25 17:39:42 +00:00
parent f7dfb493ca
commit 65aef8b924
2 changed files with 6 additions and 5 deletions

View File

@ -1,8 +1,8 @@
Facter.add('ads_instances') do Facter.add('ads_instances') do
setcode do setcode do
Dir.glob('/opt/plnxtools/ads/*').map do |x| Dir.glob('/opt/plnxtools/ads/*.instance').map do |x|
content = File.read(x) content = File.read(x)
File.basename(x) File.basename(x,File.extname(x))
end end
end end
end end

View File

@ -106,7 +106,7 @@ define plnxtools::apacheds::instance(
$bin_dir = "${plnxtools::apacheds::opt_dir}/${plnxtools::apacheds::appname}/bin" $bin_dir = "${plnxtools::apacheds::opt_dir}/${plnxtools::apacheds::appname}/bin"
file {"/opt/plnxtools/ads/$title": file {"/opt/plnxtools/ads/$title.instance":
ensure => file ensure => file
}-> }->
service {"apacheds_${title}": service {"apacheds_${title}":
@ -132,7 +132,7 @@ define plnxtools::apacheds::instance(
status => "$bin_dir/apacheds.sh $title status | grep 'is running'", status => "$bin_dir/apacheds.sh $title status | grep 'is running'",
ensure => stopped, ensure => stopped,
} -> } ->
file {"/opt/plnxtools/ads/$title": file {"/opt/plnxtools/ads/$title.instance":
ensure => absent ensure => absent
} -> } ->
file{"$ads_instances/$title": file{"$ads_instances/$title":
@ -144,6 +144,8 @@ define plnxtools::apacheds::instance(
} }
define plnxtools::apacheds::syncrepl( define plnxtools::apacheds::syncrepl(
$parition, $parition,
$consumer_id, $consumer_id,
@ -151,4 +153,3 @@ define plnxtools::apacheds::syncrepl(
{ {
} }