Uses file extension .instance for instance files in /opt/plnxtools/ads
This commit is contained in:
parent
f7dfb493ca
commit
65aef8b924
|
@ -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
|
||||||
|
|
|
@ -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(
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue