browbeat/ansible/install/collectd-container.yml
Sanjay Chari e77d651cd1 Fix collectd installation for composable roles
This patch fixes collectd installation for composable roles, and
also optimises the collectd build process on computes.

Change-Id: Icf358415312885c68879aa886a78f3ae1c163e91
2021-12-07 14:38:31 +05:30

91 lines
2.4 KiB
YAML

---
#
# Generic Playbook to install collectd, use tags to separate machine type:
#
# Examples:
#
# ansible-playbook -i hosts install/collectd.yml --tags="undercloud"
# ansible-playbook -i hosts install/collectd.yml --tags="controller"
# ansible-playbook -i hosts install/collectd.yml --tags="compute" -f 10
- hosts: Undercloud
remote_user: "{{ local_remote_user }}"
vars:
config_type: undercloud
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_undercloud|bool }
- { role: collectd, when: collectd_undercloud|bool }
tags: undercloud
environment: "{{proxy_env}}"
- hosts: Controller
strategy: free
remote_user: "{{ host_remote_user }}"
vars:
config_type: controller
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_controller|bool }
- { role: collectd, when: collectd_controller|bool }
tags: controller
- hosts: Compute*
strategy: free
remote_user: "{{ host_remote_user }}"
vars:
config_type: compute
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_compute|bool }
- { role: collectd, when: collectd_compute|bool }
tags: compute
- hosts: Networker
remote_user: "{{ host_remote_user }}"
vars:
config_type: networker
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_networker|bool }
- { role: collectd, when: collectd_networker|bool }
tags: networker
- hosts: BlockStroage
remote_user: "{{ host_remote_user }}"
vars:
config_type: blockstorage
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_blockstoarge|bool }
- { role: collectd, when: collectd_blockstorage|bool }
tags: blockstorage
- hosts: ObjectStorage
remote_user: "{{ host_remote_user }}"
vars:
config_type: objectstorage
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_objectstorage|bool }
- { role: collectd, when: collectd_objectstorage|bool }
tags: objectstorage
- hosts: CephStorage
remote_user: "{{ host_remote_user }}"
vars:
config_type: cephstorage
roles:
- { role: osp_version }
- { role: containers }
- { role: common, when: collectd_cephstorage|bool }
- { role: collectd, when: collectd_cephstorage|bool }
tags: cephstorage