browbeat/ansible/install/stop-collectd-baremetal.yml
Masco Kaliyamoorthy 260411dc66 add support for stoping the collectd
Change-Id: I0aaa73427101cc53481f12d442dce1f3f312a30a
2021-08-04 11:57:02 +05:30

81 lines
2.4 KiB
YAML

---
#
# Playbook to stop collectd on undercloud/overcloud
#
# Stop on all undercloud/overcloud machines:
# ansible-playbook -i hosts.yml install/stop-collectd-baremetal.yml
#
# Or use tags:
# ansible-playbook -i hosts.yml install/stop-collectd-baremetal.yml --tag "undercloud"
# ansible-playbook -i hosts.yml install/stop-collectd-baremetal.yml --tag "controller"
# ansible-playbook -i hosts.yml install/stop-collectd-baremetal.yml --tag "networker"
# ansible-playbook -i hosts.yml install/stop-collectd-baremetal.yml --tag "blockstorage"
# ansible-playbook -i hosts.yml install/stop-collectd-baremetal.yml --tag "objectstorage"
# ansible-playbook -i hosts.yml install/stop-collectd-baremetal.yml --tag "cephstorage"
# ansible-playbook -i hosts.yml install/stop-collectd-baremetal.yml --tag "compute"
#
- hosts: Undercloud
remote_user: "{{ local_remote_user }}"
tasks:
- name: Stop Collectd on undercloud
service: name=collectd state=stopped enabled=false
become: true
ignore_errors: true
tags: undercloud
- hosts: Controller
remote_user: "{{ host_remote_user }}"
tasks:
- name: Stop Collectd on controller
service: name=collectd state=stopped enabled=false
become: true
ignore_errors: true
tags: controller
- hosts: Networker
remote_user: "{{ host_remote_user }}"
tasks:
- name: Stop Collectd on networker
service: name=collectd state=stopped enabled=false
become: true
ignore_errors: true
tags: networker
- hosts: BlockStorage
remote_user: "{{ host_remote_user }}"
tasks:
- name: Stop Collectd on blockstorage
service: name=collectd state=stopped enabled=false
become: true
ignore_errors: true
tags: blockstorage
- hosts: ObjectStorage
remote_user: "{{ host_remote_user }}"
tasks:
- name: Stop Collectd on objectstorage
service: name=collectd state=stopped enabled=false
become: true
ignore_errors: true
tags: objectstorage
- hosts: CephStorage
remote_user: "{{ host_remote_user }}"
tasks:
- name: Stop Collectd on cephstorage
service: name=collectd state=stopped enabled=false
become: true
ignore_errors: true
tags: cephstorage
- hosts: Compute
remote_user: "{{ host_remote_user }}"
tasks:
- name: Stop Collectd on compute
service: name=collectd state=stopped enabled=false
become: true
ignore_errors: true
tags: compute