blob: 341e02e31655b6c52d1a1f9d646cb002cba563a4 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
- name: Delete the Metron Components from Ambari
ambari_service_state:
host: "{{ groups.ambari_master[0] }}"
port: "{{ ambari_port }}"
username: "{{ ambari_user }}"
password: "{{ ambari_password }}"
cluster_name: "{{ cluster_name }}"
state: deleted
component_name: "{{ item }}"
component_host: "{{ inventory_hostname }}"
with_items:
- METRON_ENRICHMENT_MASTER
- METRON_INDEXING
- METRON_PARSERS
- name: Remove the Metron packages
package:
name: "{{ item }}"
state: absent
with_items:
- metron-common
- metron-data-management
- metron-parsers
- metron-enrichment
- metron-indexing
- metron-elasticsearch
- name: Create local repo with new packages
shell: "createrepo /localrepo"
args:
creates: /localrepo/repodata
- name: Re-install the Metron Packages via Ambari
ambari_service_state:
host: "{{ groups.ambari_master[0] }}"
port: "{{ ambari_port }}"
username: "{{ ambari_user }}"
password: "{{ ambari_password }}"
cluster_name: "{{ cluster_name }}"
state: stopped
component_name: "{{ item }}"
component_host: "{{ inventory_hostname }}"
wait_for_complete: True
with_items:
- METRON_ENRICHMENT_MASTER
- METRON_INDEXING
- METRON_PARSERS
- name: Start the ambari cluster
ambari_cluster_state:
host: "{{ groups.ambari_master[0] }}"
port: "{{ ambari_port }}"
username: "{{ ambari_user }}"
password: "{{ ambari_password }}"
cluster_name: "{{ cluster_name }}"
cluster_state: started
wait_for_complete: True