browbeat/ansible/install/roles/osp_version/tasks/main.yml
Charles Short 2ba39b30ab Refresh collectd for "train"
This commit does several things at once:

- Use ansible_distribution_major_version to detect which version of the
  EPEL repository. So we dont have to hard code the URL for either epel7
  or epel 8.
- Remove "stein" workaround for colelctd-openstack role. The "stein"
  workaround has been removed in favor of running the collectd daemon
  in a podman container.
- Drop opendaylight support for collectd since it is no longer
  suupported.
- Add the collectd playbook so we can run collectd in a centos 7
  container going forward for "train". This commit still needs
  to be tested on "stein" but it will probably work anyways.
- Add browbeat-containers to tox.ini for flake8
- Simplify detection of docker or podman for older versions of OSP.
(sai)
- Fixed typo from compute_compute to collectd_compute that caused failures on computes
- clear graphite_host in install/group_vars/all.yml
- Move container DockerFiles into brwobeat tree
- Conditionally copy required Dockerfiles to node instead of git clone
- Fix up some log file paths
- Use Docker/Podman depending on release
- Provide single interface(collectd.yml) which has container and baremetal playbooks
- Introduce variable collectd_container in install/group_vars/all
- remove unneeded selinux rebaelling (already running as priveleged) when running container
- remove unneed hostfs mount
- collectd container logs to file instead of STDOUT for easier debug
- add collectd-ping package to collectd-openstack Dockerfile
- Improve docs to reflect changes
- dynamically set rabbitmq and swift paths as well for tail plugin

Co-Authored-By: Sai Sindhur Malleni <smalleni@redhat.com>

Change-Id: I627a696f6f1240d96a0e1d85c26d59bbbfae2b1b
Signed-off-by: Charles Short <chucks@redhat.com>
Signed-off-by: Sai Sindhur Malleni <smalleni@redhat.com>
2019-11-05 08:08:37 -05:00

38 lines
965 B
YAML

---
#
# Slurp OSP version file
#
- name: Check if /etc/rhosp-release exists
stat:
path: /etc/rhosp-release
register: rhosp_release_stat
- name: Get OSP Version
become: true
slurp:
src: "/etc/rhosp-release"
register: osp_version
when: rhosp_release_stat.stat.exists
- debug: msg="WARNING /etc/rhosp-release not found, defaulting version of OSP to Pike"
when: not rhosp_release_stat.stat.exists
- name: Set OSP Version Default
set_fact:
osp_version:
content: "{{'Pike' | b64encode}}"
when: not rhosp_release_stat.stat.exists
- name: set numeric version for release
set_fact:
version: "{{ osp_version.content | b64decode }}"
- name: set rhosp version (downstream)
set_fact:
rhosp_version: "{{ version.split()[5] }}"
- name: set rhosp major version (downstream)
set_fact:
rhosp_major: "{{ osp_version.content | b64decode | regex_replace('^Red Hat OpenStack Platform release ([0-9]+)\\.\\d+.*\n', '\\1') }}"