Merge "Allow user override of beat install locations"

This commit is contained in:
Zuul 2020-02-14 03:42:41 +00:00 committed by Gerrit Code Review
commit 2cf9962119
6 changed files with 36 additions and 29 deletions

View File

@ -12,7 +12,7 @@
# limitations under the License.
- name: Install Auditbeat
hosts: hosts
hosts: "{{ groups['auditbeat'] | default(groups['hosts']) }}"
become: true
vars:
haproxy_ssl: false

View File

@ -12,7 +12,7 @@
# limitations under the License.
- name: Install Filebeat
hosts: hosts
hosts: "{{ groups['filebeat'] | default(groups['hosts']) }}"
become: true
vars:
haproxy_ssl: false

View File

@ -16,17 +16,20 @@
gather_facts: false
connection: local
tasks:
- name: Add hosts to dynamic inventory group
group_by:
key: heatbeat_deployment_targets
parents: kibana
when:
- inventory_hostname in groups['kibana'][:3]
- name: Configure deployment group when Heartbeat group not specified
block:
- name: Add hosts to dynamic inventory group
group_by:
key: heartbeat_deployment_targets
parents: kibana
when:
- inventory_hostname in groups['kibana'][:3]
when: groups['heartbeat'] is not defined
tags:
- always
- name: Install Heartbeat
hosts: heatbeat_deployment_targets
hosts: "{{ groups['heartbeat'] | default(groups['heartbeat_deployment_targets'] | default([])) }}"
become: true
vars:
haproxy_ssl: false

View File

@ -16,29 +16,32 @@
gather_facts: false
connection: local
tasks:
- name: Add hosts to dynamic inventory group
group_by:
key: journalbeat_deployment_containers
parents: all_journalbeat_deployments
when:
- openstack_release is defined and
openstack_release is version('18.0.0', 'lt')
- physical_host is defined and
physical_host != inventory_hostname
- name: Configure deployment group when Journalbeat group not specified
block:
- name: Add hosts to dynamic inventory group
group_by:
key: journalbeat_deployment_containers
parents: all_journalbeat_deployments
when:
- openstack_release is defined and
openstack_release is version('18.0.0', 'lt')
- physical_host is defined and
physical_host != inventory_hostname
- name: Add hosts to dynamic inventory group
group_by:
key: journalbeat_deployment_hosts
parents: all_journalbeat_deployments
- name: Add hosts to dynamic inventory group
group_by:
key: journalbeat_deployment_hosts
parents: all_journalbeat_deployments
when:
- physical_host is undefined or
physical_host == inventory_hostname
when:
- physical_host is undefined or
physical_host == inventory_hostname
- groups['journalbeat'] is not defined
tags:
- always
- name: Install Journalbeat
hosts: all_journalbeat_deployments
hosts: "{{ groups['journalbeat'] | default(groups['all_journalbeat_deployments']) }}"
become: true
vars:
haproxy_ssl: false

View File

@ -11,8 +11,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Install Metricsbeat
hosts: all
- name: Install Metricbeat
# The nested defaults are required as ansible doesn't short-circuit in its default filter
hosts: "{{ groups['metricbeat'] | default( (groups['hosts'] | default([])) + (groups['all_containers'] | default([]))) }}"
become: true
vars:
haproxy_ssl: false

View File

@ -12,7 +12,7 @@
# limitations under the License.
- name: Install Packetbeat
hosts: hosts
hosts: "{{ groups['packetbeat'] | default(groups['hosts']) }}"
become: true
vars:
haproxy_ssl: false