openstack-ansible-os_ceilom.../tests/test-install-ceilometer.yml
Jesse Pretorius 854569cdb8 Switch to simple service test instead of tempest
It appears that ceilometer itself has no tests now that there
is no API, so we switch to simply verifying if the services
are up.

Distro installs for xenial are not working, which is not
surprising given that the service is using queens packages.
We therefore disable the test for follow up in another patch.

Change-Id: Ia06438c22430c3432f6dff523c22ec3cd7bdddf8
2018-09-18 13:48:06 +01:00

62 lines
1.9 KiB
YAML

---
# Copyright 2015, 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: Playbook for deploying Ceilometer
hosts: ceilometer_all
user: root
gather_facts: true
vars_files:
- common/test-vars.yml
roles:
- role: "os_ceilometer"
post_tasks:
- name: Check status of ceilometer-agent-notification
command: systemctl status ceilometer-agent-notification
ignore_errors: yes
changed_when: false
register: _ceilometer_agent_notification
args:
warn: no
tags:
- skip_ansible_lint
- name: Fail if ceilometer-agent-notification is not running
fail:
msg: |
Service ceilometer-agent-notification is not running.
{{ _ceilometer_agent_notification.stdout }}
{{ _ceilometer_agent_notification.stderr }}
when:
- "_ceilometer_agent_notification is failed"
- name: Check status of ceilometer-polling
command: systemctl status ceilometer-polling
ignore_errors: yes
changed_when: false
register: _ceilometer_polling
args:
warn: no
tags:
- skip_ansible_lint
- name: Fail if ceilometer-polling is not running
fail:
msg: |
Service ceilometer-polling is not running.
{{ _ceilometer_polling.stdout }}
{{ _ceilometer_polling.stderr }}
when:
- "_ceilometer_polling is failed"