openstack-ansible-os_ceilom.../tests/test-install-ceilometer.yml

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"