openstack-ansible-os_zun/tests/test-zun-check.yml

51 lines
1.7 KiB
YAML

---
# Copyright 2018, 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: Create a zun image
hosts: zun_compute
remote_user: root
tasks:
- name: Pull cirros image
command: docker pull cirros
# TODO(cloudnull): Set up failed_when and changed_when conditions
tags:
- skip_ansible_lint
- name: Upload image into glance
shell: |
. /root/openrc
docker save cirros | /openstack/venvs/zun-untagged/bin/openstack image create zun-cirros --public --container-format docker --disk-format raw
# TODO(cloudnull): Set up failed_when and changed_when conditions
tags:
- skip_ansible_lint
- name: Run zun service check
hosts: zun_api[0]
remote_user: root
tasks:
- name: Check zun service is functional
shell: |
. /root/openrc
/openstack/venvs/zun-untagged/bin/openstack appcontainer service list
changed_when: false
- name: Create zun container
shell: |
. /root/openrc
/openstack/venvs/zun-untagged/bin/openstack appcontainer run --name container-check --net network=private zun-cirros ping 127.0.0.1
# TODO(cloudnull): Set up failed_when and changed_when conditions
tags:
- skip_ansible_lint