Automate collectd_container var
This patch automates collectd_container var to set to true if running on OpenStack version Stein or later and set to false for below OpenStack version which was manually done earlier. Change-Id: Idd61f060a088caa1eae9d2a80e3c7ceb5debc424
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
---
|
||||
- name: set fact collectd_container
|
||||
import_playbook: pre-collectd.yml
|
||||
|
||||
- name: Run containerized collectd (Stein and greater recommended)
|
||||
import_playbook: collectd-container.yml
|
||||
when: collectd_container
|
||||
when: hostvars['undercloud']['collectd_container']
|
||||
|
||||
- name: Run collectd installed through RPMs
|
||||
import_playbook: collectd-baremetal.yml
|
||||
when: not collectd_container
|
||||
|
||||
when: not hostvars['undercloud']['collectd_container']
|
||||
|
||||
@@ -144,8 +144,6 @@ repos: {}
|
||||
# Collectd Configuration
|
||||
########################################
|
||||
# Install release specific templates
|
||||
# Set collectd_container true for OSP >= 15
|
||||
collectd_container: true
|
||||
# Install collectd from EPEL
|
||||
collectd_from_epel: true
|
||||
# Interval in seconds
|
||||
|
||||
8
ansible/install/pre-collectd.yml
Normal file
8
ansible/install/pre-collectd.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- hosts: undercloud
|
||||
roles:
|
||||
- { role: osp_version }
|
||||
tasks:
|
||||
- name: set fact collectd_container
|
||||
set_fact:
|
||||
collectd_container: "{{ (rhosp_major|int > 14)| ternary(true, false) }}"
|
||||
@@ -82,8 +82,7 @@ has been installed. To skip directly to this task execute:
|
||||
(Optional) Install Collectd
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Set ``collectd_container`` to true in ``ansible/install/group_vars/all.yml`` if running on OpenStack version Stein or later. The containerized collectd work
|
||||
can also work with Queens release but it is not recommended.
|
||||
``collectd_container`` is set to true if running on OpenStack version Stein or later. The containerized collectd can also work with Queens release but it is not recommended.
|
||||
|
||||
::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user