26 lines
1.3 KiB
YAML
26 lines
1.3 KiB
YAML
#---------------------------------------------------------------------------
|
|
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
|
|
# 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: Get the tenant id from Keystone
|
|
shell: keystone --os-endpoint={{ keystone_admin_url }} --os-token={{ keystone_admin_token }} tenant-list | grep {{ tenant_name }} | awk '{print $2}'
|
|
register: tenant_id
|
|
|
|
- name: docker pull
|
|
command: docker pull {{ hostvars[groups['docker'][0]]['inventory_hostname'] }}:{{ docker_registry_port }}/{{ tenant_id.stdout_lines[0] }}
|
|
|
|
- name: shutdown_container
|
|
shell: "/usr/bin/python {{ lxc_device }}/scripts/send_halt_cmd_to_daemon_factory.py
|
|
{{ lxc_device }}/pipes/scopes/AUTH_{{ tenant_id.stdout_lines[0] }}/factory_pipe"
|