22e17a0cb8
Change-Id: I808d129e79234190af28a0e8653070b4b8d9f0c2
146 lines
4.5 KiB
YAML
146 lines
4.5 KiB
YAML
---
|
|
#
|
|
# Playbook to install collectd on undercloud/overcloud
|
|
#
|
|
# Install on all undercloud/overcloud machines:
|
|
# ansible-playbook -i hosts install/collectd-openstack.yml
|
|
#
|
|
# Or use tags:
|
|
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "undercloud"
|
|
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "controller"
|
|
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "networker"
|
|
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "blockstorage"
|
|
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "objectstorage"
|
|
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "cephstorage"
|
|
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "compute"
|
|
#
|
|
|
|
|
|
- hosts: undercloud
|
|
remote_user: "{{ local_remote_user }}"
|
|
vars:
|
|
config_type: undercloud
|
|
roles:
|
|
- { role: common, when: collectd_undercloud }
|
|
- { role: epel, when: collectd_undercloud }
|
|
- { role: repo }
|
|
- { role: collectd-openstack, when: collectd_undercloud }
|
|
tasks:
|
|
- name: Collectd off if not collectd_undercloud
|
|
service: name=collectd state=stopped enabled=false
|
|
become: true
|
|
when: not collectd_undercloud
|
|
ignore_errors: true
|
|
tags: undercloud
|
|
environment: "{{proxy_env}}"
|
|
|
|
- hosts: controller
|
|
remote_user: "{{ host_remote_user }}"
|
|
vars:
|
|
config_type: controller
|
|
roles:
|
|
- { role: osp_version }
|
|
- { role: common, when: collectd_controller }
|
|
- { role: epel, when: collectd_controller }
|
|
- { role: repo }
|
|
- { role: collectd-openstack, when: collectd_controller }
|
|
tasks:
|
|
- name: Collectd off if not collectd_controller
|
|
service: name=collectd state=stopped enabled=false
|
|
become: true
|
|
when: not collectd_controller
|
|
ignore_errors: true
|
|
tags: controller
|
|
environment: "{{proxy_env}}"
|
|
|
|
- hosts: networker
|
|
remote_user: "{{ host_remote_user }}"
|
|
vars:
|
|
config_type: networker
|
|
roles:
|
|
- { role: common, when: collectd_networker }
|
|
- { role: epel, when: collectd_networker }
|
|
- { role: repo }
|
|
- { role: collectd-openstack, when: collectd_networker }
|
|
tasks:
|
|
- name: Collectd off if not collectd_networker
|
|
service: name=collectd state=stopped enabled=false
|
|
become: true
|
|
when: not collectd_networker
|
|
ignore_errors: true
|
|
tags: networker
|
|
environment: "{{proxy_env}}"
|
|
|
|
- hosts: blockstorage
|
|
remote_user: "{{ host_remote_user }}"
|
|
vars:
|
|
config_type: blockstorage
|
|
roles:
|
|
- { role: common, when: collectd_blockstorage }
|
|
- { role: epel, when: collectd_blockstorage }
|
|
- { role: repo }
|
|
- { role: collectd-openstack, when: collectd_blockstorage }
|
|
tasks:
|
|
- name: Collectd off if not collectd_blockstorage
|
|
service: name=collectd state=stopped enabled=false
|
|
become: true
|
|
when: not collectd_blockstorage
|
|
ignore_errors: true
|
|
tags: blockstorage
|
|
environment: "{{proxy_env}}"
|
|
|
|
- hosts: objectstorage
|
|
remote_user: "{{ host_remote_user }}"
|
|
vars:
|
|
config_type: objectstorage
|
|
roles:
|
|
- { role: common, when: collectd_objectstorage }
|
|
- { role: epel, when: collectd_objectstorage }
|
|
- { role: repo }
|
|
- { role: collectd-openstack, when: collectd_objectstorage }
|
|
tasks:
|
|
- name: Collectd off if not collectd_objectstorage
|
|
service: name=collectd state=stopped enabled=false
|
|
become: true
|
|
when: not collectd_objectstorage
|
|
ignore_errors: true
|
|
tags: objectstorage
|
|
environment: "{{proxy_env}}"
|
|
|
|
- hosts: cephstorage
|
|
remote_user: "{{ host_remote_user }}"
|
|
vars:
|
|
config_type: cephstorage
|
|
roles:
|
|
- { role: common, when: collectd_cephstorage }
|
|
- { role: epel, when: collectd_cephstorage }
|
|
- { role: repo }
|
|
- { role: collectd-openstack, when: collectd_cephstorage }
|
|
tasks:
|
|
- name: Collectd off if not collectd_cephstorage
|
|
service: name=collectd state=stopped enabled=false
|
|
become: true
|
|
when: not collectd_cephstorage
|
|
ignore_errors: true
|
|
tags: cephstorage
|
|
environment: "{{proxy_env}}"
|
|
|
|
- hosts: compute
|
|
remote_user: "{{ host_remote_user }}"
|
|
vars:
|
|
config_type: compute
|
|
roles:
|
|
- { role: osp_version }
|
|
- { role: common, when: collectd_compute }
|
|
- { role: epel, when: collectd_compute }
|
|
- { role: repo }
|
|
- { role: collectd-openstack, when: collectd_compute }
|
|
tasks:
|
|
- name: Collectd off if not collectd_compute
|
|
service: name=collectd state=stopped enabled=false
|
|
become: true
|
|
when: not collectd_compute
|
|
ignore_errors: true
|
|
tags: compute
|
|
environment: "{{proxy_env}}"
|