diff --git a/manifests/site.pp b/manifests/site.pp index 878beafe1e..fc3126255a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -461,10 +461,18 @@ node /^subunit-worker\d+\.openstack\.org$/ { # Node-OS: precise node /^elasticsearch0[1-7]\.openstack\.org$/ { $group = "elasticsearch" + $iptables_nodes_rule = regsubst ($elasticsearch_nodes, + '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 9200:9400 -s \1 -j ACCEPT') + $iptables_clients_rule = regsubst ($elasticsearch_clients, + '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 9200:9400 -s \1 -j ACCEPT') + $iptables_rule = flatten([$iptables_nodes_rule, $iptables_clients_rule]) + class { 'openstack_project::server': + iptables_public_tcp_ports => [22], + iptables_rules6 => $iptables_rule, + iptables_rules4 => $iptables_rule, + sysadmins => hiera('sysadmins', []), + } class { 'openstack_project::elasticsearch_node': - sysadmins => hiera('sysadmins', []), - elasticsearch_nodes => $elasticsearch_nodes, - elasticsearch_clients => $elasticsearch_clients, discover_nodes => $elasticsearch_nodes, } } diff --git a/modules/openstack_project/manifests/elasticsearch_node.pp b/modules/openstack_project/manifests/elasticsearch_node.pp index f2a8304f03..3a004dacef 100644 --- a/modules/openstack_project/manifests/elasticsearch_node.pp +++ b/modules/openstack_project/manifests/elasticsearch_node.pp @@ -15,22 +15,9 @@ # Elasticsearch server glue class. # class openstack_project::elasticsearch_node ( - $elasticsearch_nodes = [], - $elasticsearch_clients = [], $discover_nodes = ['localhost'], $heap_size = '30g', - $sysadmins = [] ) { - $iptables_nodes_rule = regsubst ($elasticsearch_nodes, '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 9200:9400 -s \1 -j ACCEPT') - $iptables_clients_rule = regsubst ($elasticsearch_clients, '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 9200:9400 -s \1 -j ACCEPT') - $iptables_rule = flatten([$iptables_nodes_rule, $iptables_clients_rule]) - class { 'openstack_project::server': - iptables_public_tcp_ports => [22], - iptables_rules6 => $iptables_rule, - iptables_rules4 => $iptables_rule, - sysadmins => $sysadmins, - } - class { 'logstash::elasticsearch': } class { '::elasticsearch':