--- # 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 gather_facts: true any_errors_fatal: true vars_files: - common/test-vars.yml tasks: - name: Pull cirros image command: docker pull cirros # TODO(cloudnull): Set up failed_when and changed_when conditions changed_when: false - name: Ensure the clouds.yaml file is present include_role: name: openstack_openrc - name: Upload image into glance shell: | docker save cirros | /openstack/venvs/zun-untagged/bin/openstack --os-cloud default image create zun-cirros --public --container-format docker --disk-format raw # TODO(cloudnull): Set up failed_when and changed_when conditions changed_when: false - name: Run zun service check hosts: zun_api[0] remote_user: root gather_facts: true any_errors_fatal: true vars_files: - common/test-vars.yml tasks: - name: Ensure the clouds.yaml file is present include_role: name: openstack_openrc - name: Check zun service is functional command: | /openstack/venvs/zun-untagged/bin/openstack --os-cloud default appcontainer service list changed_when: false - name: Create zun container command: | /openstack/venvs/zun-untagged/bin/openstack --os-cloud default 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 changed_when: false