Skip to content

Commit

Permalink
Merge "Add repo for java-openjdk and install java"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed May 2, 2018
2 parents 5f617aa + 5368f76 commit 739188c
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion ansible/install/roles/collectd-openstack/tasks/main.yml
Expand Up @@ -39,6 +39,24 @@
- collectd-turbostat
- collectd-ping

# (sai) Since we moved to containers we don't have java installed on the host
# anymore but it is needed for collectd-java
- name: Add repository
yum_repository:
name: CentOS-7-Base
description: Core CentOS7 Packages
baseurl: http://mirror.centos.org/centos/7/os/$basearch/
enabled: yes
become: true
register: repo_add
when: ('controller' in group_names and {{opendaylight_java_plugin}} == true)

- name: Add key
rpm_key:
state: present
key: https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7
become: true

# (sai) Separating out collectd java rpms as they have a lot of dependencies and
# are only required for ODL monitoring on controllers only
- name: Install collectd java specific rpms
Expand All @@ -47,9 +65,17 @@
state: present
become: true
with_items:
- java-1.8.0-openjdk
- collectd-java
- collectd-generic-jmx
when: ('controller' in group_names and {{opendaylight_java_plugin}} == true)
when: (repo_add is success and 'controller' in group_names and {{opendaylight_java_plugin}} == true)

- name: Remove repository
yum_repository:
name: CentOS-7-Base
state: absent
become: true
when: (repo_add is success and 'controller' in group_names and {{opendaylight_java_plugin}} == true)

# Iostat plugin requires sysstat since shelling iostat for stats, Also it is
# handy to have sysstat.
Expand Down

0 comments on commit 739188c

Please sign in to comment.