Add containers role

Add containers role so that we can use podman/docker
cli detection.

Change-Id: I138e649db721bfa30e454f41be38eb5d053a3fda
Signed-off-by: Charles Short <chucks@redhat.com>
This commit is contained in:
Charles Short 2019-11-15 14:04:18 -05:00
parent 445e67939c
commit a3a3c51152
3 changed files with 22 additions and 14 deletions

View File

@ -15,6 +15,7 @@
config_type: undercloud
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_undercloud|bool }
- { role: collectd, when: collectd_undercloud|bool }
tags: undercloud
@ -26,6 +27,7 @@
config_type: controller
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_controller|bool }
- { role: collectd, when: collectd_controller|bool }
tags: controller
@ -36,6 +38,7 @@
config_type: compute
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_compute|bool }
- { role: collectd, when: collectd_compute|bool }
tags: compute
@ -46,6 +49,7 @@
config_type: networker
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_networker|bool }
- { role: collectd, when: collectd_networker|bool }
tags: networker
@ -56,6 +60,7 @@
config_type: blockstorage
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_blockstoarge|bool }
- { role: collectd, when: collectd_blockstorage|bool }
tags: blockstorage
@ -66,6 +71,7 @@
config_type: objectstorage
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_objectstorage|bool }
- { role: collectd, when: collectd_objectstorage|bool }
tags: objectstorage
@ -76,6 +82,7 @@
config_type: cephstorage
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_cephstorage|bool }
- { role: collectd, when: collectd_cephstorage|bool }
tags: cephstorage

View File

@ -59,10 +59,6 @@
dest: "{{ ansible_user_dir }}/browbeat/browbeat-containers"
when: not (directory_exists.stat.isdir is defined and directory_exists.stat.isdir)
- name: Set browbeat_contianers_path
set_fact:
browbeat_containers_path: "{{ ansible_user_dir }}/browbeat/browbeat-containers"
- name: Create configuration directory
file:
path: "{{ browbeat_containers_path }}/collectd-openstack/config"
@ -75,16 +71,6 @@
- name: Build and Run container
block:
- name: Set container_cli (OSP < 15)
set_fact:
container_cli: docker
when: rhosp_version is version('15.0', '<') and osp_version is version('12.0', '>=')
- name: Set container_cli (OSP > 15)
set_fact:
container_cli: podman
when: rhosp_version is version('15.0', '>=')
- name: Build collectd-openstack container
shell: |
{{ container_cli }} build -t collectd-openstack {{ browbeat_containers_path }}/collectd-openstack/

View File

@ -0,0 +1,15 @@
---
- name: Set browbeat_contianers_path
set_fact:
browbeat_containers_path: "{{ ansible_user_dir }}/browbeat/browbeat-containers"
- name: Set container_cli (OSP < 15)
set_fact:
container_cli: docker
when: rhosp_version is version('15.0', '<') and osp_version is version('12.0', '>=')
- name: Set container_cli (OSP > 15)
set_fact:
container_cli: podman
when: rhosp_version is version('15.0', '>=')