Manually merge abusesa::search and solr from parameterize
This commit is contained in:
parent
a5a7b8f15c
commit
695f353f3b
3 changed files with 99 additions and 73 deletions
|
@ -93,22 +93,35 @@ class abusesa {
|
|||
|
||||
# Install AbuseSA Search.
|
||||
#
|
||||
class abusesa::search {
|
||||
# === Parameters
|
||||
#
|
||||
# $solrurl:
|
||||
# URL to sorl.
|
||||
#
|
||||
# $logourl:
|
||||
# Path to logo image.
|
||||
#
|
||||
# $cssfile:
|
||||
# Path to css file.
|
||||
#
|
||||
# $webhosts:
|
||||
# List of search virtual hosts.
|
||||
#
|
||||
class abusesa::search(
|
||||
$solrurl="https://${::homename}/solr/generic/",
|
||||
$logourl="img/Codenomicon_logo_small.png",
|
||||
$cssfile="css/code.css",
|
||||
$webhosts=undef
|
||||
) {
|
||||
|
||||
include solr
|
||||
|
||||
if !$abusesa_search_package {
|
||||
if $abusesa_search_package_latest {
|
||||
$abusesa_search_package = $abusesa_search_package_latest
|
||||
if ! $abusesa_search_package {
|
||||
if $::abusesa_search_package_latest {
|
||||
$abusesa_search_package = $::abusesa_search_package_latest
|
||||
} else {
|
||||
fail("Must define \$abusesa_search_package or \$abusesa_search_package_latest")
|
||||
}
|
||||
}
|
||||
|
||||
if !$abusesa_search_solrurl {
|
||||
$abusesa_search_solrurl = "https://${::homename}/solr/generic/"
|
||||
}
|
||||
|
||||
file { "/usr/local/src/abusesa-search.tar.gz":
|
||||
ensure => present,
|
||||
mode => "0644",
|
||||
|
@ -136,10 +149,6 @@ class abusesa::search {
|
|||
}
|
||||
}
|
||||
|
||||
package { "python-lxml":
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
file { "/srv/solr/cores/generic":
|
||||
ensure => directory,
|
||||
mode => "0660",
|
||||
|
@ -206,18 +215,23 @@ class abusesa::search {
|
|||
require => Python::Setup::Install["/usr/local/src/abusesa-search"],
|
||||
}
|
||||
|
||||
define configwebhost($htdocs) {
|
||||
file { "/srv/www/https/${name}/search":
|
||||
ensure => link,
|
||||
target => $htdocs,
|
||||
require => File["/srv/www/https/${name}"],
|
||||
}
|
||||
}
|
||||
|
||||
if $abusesa_search_webhosts {
|
||||
configwebhost { $abusesa_search_webhosts:
|
||||
if $webhosts {
|
||||
abusesa::search::configwebhost { $webhosts:
|
||||
htdocs => $htdocs,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Enable AbuseSA Search for virtual host.
|
||||
#
|
||||
define abusesa::search::configwebhost($htdocs) {
|
||||
|
||||
file { "/srv/www/https/${name}/search":
|
||||
ensure => link,
|
||||
target => $htdocs,
|
||||
require => File["/srv/www/https/${name}"],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue