openstack-ansible/rpc_deployment/playbooks/setup/destroy-containers.yml
Andy McCrae cc9ae15a6b Fix container_group var for container playbooks
Following on from #61, the container_group has to be specified each
time, this patch fixes that.

* Set the groups for "container_groups" appropriately
2014-09-03 16:17:58 +01:00

24 lines
908 B
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.
# This playbook destroys all known containers.
- hosts: "{{ host_group|default('hosts') }}"
user: root
roles:
- container_destroy
vars:
default_container_groups: "{{ hostvars[inventory_hostname]['container_types'] }}"
container_groups: "{{ groups[container_group|default(default_container_groups)] }}"