openstack-ansible/rpc_deployment/roles/rabbit_remove/tasks/main.yml
2014-08-26 18:08:15 -05:00

42 lines
1.1 KiB
YAML

---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed 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: Stop Rabbit App
shell: rabbitmqctl stop_app
ignore_errors: yes
- name: Reset Rabbit State
shell: rabbitmqctl force_reset
ignore_errors: yes
- name: remove rabbit packages
apt:
pkg: "{{ item }}"
state: absent
purge: yes
update_cache: yes
cache_valid_time: 600
ignore_errors: yes
with_items:
- rabbitmq-server
- erlang
ignore_errors: yes
- name: Remove Mnesia State
file:
path: /var/lib/rabbitmq/mnesia/
state: absent
ignore_errors: yes