Skip to content
Permalink
Browse files

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>
  • Loading branch information...
zulcss committed Nov 15, 2019
1 parent 445e679 commit a3a3c51152ad300ed045a8a885f80c3a5c74efe9
@@ -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
@@ -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/
@@ -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', '>=')

0 comments on commit a3a3c51

Please sign in to comment.
You can’t perform that action at this time.