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:
parent
445e67939c
commit
a3a3c51152
@ -15,6 +15,7 @@
|
|||||||
config_type: undercloud
|
config_type: undercloud
|
||||||
roles:
|
roles:
|
||||||
- { role: osp_version }
|
- { role: osp_version }
|
||||||
|
- { role: containers }
|
||||||
- { role: common, when: collectd_undercloud|bool }
|
- { role: common, when: collectd_undercloud|bool }
|
||||||
- { role: collectd, when: collectd_undercloud|bool }
|
- { role: collectd, when: collectd_undercloud|bool }
|
||||||
tags: undercloud
|
tags: undercloud
|
||||||
@ -26,6 +27,7 @@
|
|||||||
config_type: controller
|
config_type: controller
|
||||||
roles:
|
roles:
|
||||||
- { role: osp_version }
|
- { role: osp_version }
|
||||||
|
- { role: containers }
|
||||||
- { role: common, when: collectd_controller|bool }
|
- { role: common, when: collectd_controller|bool }
|
||||||
- { role: collectd, when: collectd_controller|bool }
|
- { role: collectd, when: collectd_controller|bool }
|
||||||
tags: controller
|
tags: controller
|
||||||
@ -36,6 +38,7 @@
|
|||||||
config_type: compute
|
config_type: compute
|
||||||
roles:
|
roles:
|
||||||
- { role: osp_version }
|
- { role: osp_version }
|
||||||
|
- { role: containers }
|
||||||
- { role: common, when: collectd_compute|bool }
|
- { role: common, when: collectd_compute|bool }
|
||||||
- { role: collectd, when: collectd_compute|bool }
|
- { role: collectd, when: collectd_compute|bool }
|
||||||
tags: compute
|
tags: compute
|
||||||
@ -46,6 +49,7 @@
|
|||||||
config_type: networker
|
config_type: networker
|
||||||
roles:
|
roles:
|
||||||
- { role: osp_version }
|
- { role: osp_version }
|
||||||
|
- { role: containers }
|
||||||
- { role: common, when: collectd_networker|bool }
|
- { role: common, when: collectd_networker|bool }
|
||||||
- { role: collectd, when: collectd_networker|bool }
|
- { role: collectd, when: collectd_networker|bool }
|
||||||
tags: networker
|
tags: networker
|
||||||
@ -56,6 +60,7 @@
|
|||||||
config_type: blockstorage
|
config_type: blockstorage
|
||||||
roles:
|
roles:
|
||||||
- { role: osp_version }
|
- { role: osp_version }
|
||||||
|
- { role: containers }
|
||||||
- { role: common, when: collectd_blockstoarge|bool }
|
- { role: common, when: collectd_blockstoarge|bool }
|
||||||
- { role: collectd, when: collectd_blockstorage|bool }
|
- { role: collectd, when: collectd_blockstorage|bool }
|
||||||
tags: blockstorage
|
tags: blockstorage
|
||||||
@ -66,6 +71,7 @@
|
|||||||
config_type: objectstorage
|
config_type: objectstorage
|
||||||
roles:
|
roles:
|
||||||
- { role: osp_version }
|
- { role: osp_version }
|
||||||
|
- { role: containers }
|
||||||
- { role: common, when: collectd_objectstorage|bool }
|
- { role: common, when: collectd_objectstorage|bool }
|
||||||
- { role: collectd, when: collectd_objectstorage|bool }
|
- { role: collectd, when: collectd_objectstorage|bool }
|
||||||
tags: objectstorage
|
tags: objectstorage
|
||||||
@ -76,6 +82,7 @@
|
|||||||
config_type: cephstorage
|
config_type: cephstorage
|
||||||
roles:
|
roles:
|
||||||
- { role: osp_version }
|
- { role: osp_version }
|
||||||
|
- { role: containers }
|
||||||
- { role: common, when: collectd_cephstorage|bool }
|
- { role: common, when: collectd_cephstorage|bool }
|
||||||
- { role: collectd, when: collectd_cephstorage|bool }
|
- { role: collectd, when: collectd_cephstorage|bool }
|
||||||
tags: cephstorage
|
tags: cephstorage
|
||||||
|
@ -59,10 +59,6 @@
|
|||||||
dest: "{{ ansible_user_dir }}/browbeat/browbeat-containers"
|
dest: "{{ ansible_user_dir }}/browbeat/browbeat-containers"
|
||||||
when: not (directory_exists.stat.isdir is defined and directory_exists.stat.isdir)
|
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
|
- name: Create configuration directory
|
||||||
file:
|
file:
|
||||||
path: "{{ browbeat_containers_path }}/collectd-openstack/config"
|
path: "{{ browbeat_containers_path }}/collectd-openstack/config"
|
||||||
@ -75,16 +71,6 @@
|
|||||||
|
|
||||||
- name: Build and Run container
|
- name: Build and Run container
|
||||||
block:
|
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
|
- name: Build collectd-openstack container
|
||||||
shell: |
|
shell: |
|
||||||
{{ container_cli }} build -t collectd-openstack {{ browbeat_containers_path }}/collectd-openstack/
|
{{ container_cli }} build -t collectd-openstack {{ browbeat_containers_path }}/collectd-openstack/
|
||||||
|
15
ansible/install/roles/containers/tasks/main.yml
Normal file
15
ansible/install/roles/containers/tasks/main.yml
Normal 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', '>=')
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user