--- # Copyright 2016 Internet Solutions (Pty) Ltd # # 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. # # (c) 2016 Donovan Francesco # (c) 2016 Paul Stevens # Reference: https://github.com/openstack/monasca-api/blob/master/docs/monasca-api-spec.md - name: Playbook for functional testing monasca hosts: monasca_api user: root gather_facts: false tasks: - name: Install httplib2 so we can use the uri module pip: name: httplib2 - name: Check the monasca-api uri: url: "http://localhost:8070" status_code: 401 register: result until: - result is defined - result.status is defined - result.status == 401 retries: 5 delay: 10 vars_files: - common/test-vars.yml - test-vars.yml