030df04ef8
This change fixes monasca modules to work with the latest version of monascaclient. Other minor changes: - Use cryptography instead of pycrypto - Removed duplicate variable for monasca_api_port - Added static paths for dashboards Change-Id: Ib4fe27c276413bb2e1e5da3fe532d824745c5b99
54 lines
2.1 KiB
YAML
54 lines
2.1 KiB
YAML
---
|
|
# 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: Wait for monasca-api to come up
|
|
uri:
|
|
url: "{{ monasca_service_internalurl }}"
|
|
status_code: 401
|
|
register: result
|
|
until: result|success
|
|
retries: 5
|
|
delay: 2
|
|
|
|
- name: Setup default notification method
|
|
monasca_notification_method:
|
|
name: "{{ monasca_notification_name }}"
|
|
type: "{{ monasca_notification_type }}"
|
|
address: "{{ monasca_notification_address }}"
|
|
keystone_auth_url: "{{ keystone_service_adminurl }}"
|
|
keystone_username: "{{ keystone_admin_user_name }}"
|
|
keystone_password: "{{ keystone_auth_admin_password }}"
|
|
keystone_project_name: "{{ keystone_admin_tenant_name }}"
|
|
monasca_api_url: "{{ monasca_service_internalurl }}"
|
|
register: default_notification
|
|
|
|
- name: Create default alarm definitions
|
|
monasca_alarm_definition:
|
|
name: "{{ item.name }}"
|
|
description: "{{ item.description | default('') }}"
|
|
expression: "{{ item.expression }}"
|
|
match_by: "{{ item.match_by | default(['hostname']) }}"
|
|
severity: "{{ item.severity | default('LOW') }}"
|
|
alarm_actions:
|
|
- "{{ default_notification.notification_method_id }}"
|
|
ok_actions:
|
|
- "{{ default_notification.notification_method_id }}"
|
|
undetermined_actions:
|
|
- "{{ default_notification.notification_method_id }}"
|
|
keystone_auth_url: "{{ keystone_service_adminurl }}"
|
|
keystone_username: "{{ keystone_admin_user_name }}"
|
|
keystone_password: "{{ keystone_auth_admin_password }}"
|
|
keystone_project_name: "{{ keystone_admin_tenant_name }}"
|
|
monasca_api_url: "{{ monasca_service_internalurl }}"
|
|
with_items: "{{ monasca_default_alarms }}"
|