f349038b1d
The epel-release package provides a yum repository configuration for EPEL, and points to the upstream EPEL mirrors. In some cases this is undesirable, such as when a local EPEL mirror is available, or access to the public repositories is not possible. This change makes it possible to skip installation of epel-release, by setting 'yum_install_epel' to 'false'. Change-Id: Ib685b0c3e21df01c4dd177771f019fae4bb90e66 Story: 2003277 Task: 24218
70 lines
2.6 KiB
YAML
70 lines
2.6 KiB
YAML
---
|
|
- name: Check whether Grafana is enabled
|
|
hosts: overcloud
|
|
tags:
|
|
- grafana
|
|
tasks:
|
|
- name: Create monitoring group with grafana enabled
|
|
group_by:
|
|
key: "monitoring_with_grafana_enabled_{{ kolla_enable_grafana | bool }}"
|
|
|
|
- name: Set the Monasca control plane project ID
|
|
hosts: monitoring_with_grafana_enabled_True[0]
|
|
gather_facts: False
|
|
tags:
|
|
- grafana
|
|
vars:
|
|
venv: "{{ virtualenv_path }}/shade"
|
|
roles:
|
|
- role: stackhpc.os-openstackclient
|
|
os_openstackclient_venv: "{{ venv }}"
|
|
os_openstackclient_install_epel: "{{ yum_install_epel }}"
|
|
when: kolla_enable_monasca | bool
|
|
|
|
tasks:
|
|
- name: Look up Monasca control plane project ID
|
|
shell: >
|
|
source {{ venv }}/bin/activate &&
|
|
openstack project show monasca --format json --column id
|
|
register: monasca_project_show
|
|
changed_when: False
|
|
environment: "{{ openstack_auth_env }}"
|
|
when: kolla_enable_monasca | bool
|
|
|
|
- name: Set Monasca control plane ID
|
|
set_fact:
|
|
monasca_control_plane_project_id: "{{ (monasca_project_show.stdout | from_json).get('id') }}"
|
|
when: kolla_enable_monasca | bool
|
|
|
|
- name: Configure control plane monitoring for Grafana
|
|
# Only required to run on a single host.
|
|
hosts: monitoring_with_grafana_enabled_True[0]
|
|
gather_facts: False
|
|
tags:
|
|
- grafana
|
|
pre_tasks:
|
|
- name: Set fact for the VIP address
|
|
set_fact:
|
|
kolla_internal_vip_address: "{{ internal_net_name | net_vip_address }}"
|
|
when: kolla_enable_haproxy | bool
|
|
|
|
- name: Set fact for the VIP address
|
|
set_fact:
|
|
kolla_internal_vip_address: "{{ internal_net_name | net_ip }}"
|
|
when: not kolla_enable_haproxy | bool
|
|
|
|
- name: Include Kolla passwords for Grafana local admin account credentials
|
|
include_vars: "{{ kayobe_config_path }}/kolla/passwords.yml"
|
|
roles:
|
|
- role: stackhpc.grafana-conf
|
|
grafana_conf_organisation: "{{ grafana_control_plane_organisation }}"
|
|
grafana_conf_grafana_admin_user: "{{ grafana_local_admin_user_name }}"
|
|
grafana_conf_grafana_admin_pass: "{{ grafana_admin_password }}"
|
|
grafana_conf_grafana_dashboard_repo:
|
|
repo: "{{ grafana_monitoring_node_dashboard_repo }}"
|
|
version: "{{ grafana_monitoring_node_dashboard_repo_version }}"
|
|
checkout_path: "{{ grafana_monitoring_node_dashboard_repo_checkout_path }}"
|
|
relative_path: "{{ grafana_monitoring_node_dashboard_repo_path }}"
|
|
grafana_conf_grafana_url: "http://{{ kolla_internal_vip_address }}:3000"
|
|
grafana_conf_grafana_datasources: "{{ grafana_datasources }}"
|