blob: 8ef9c96f77cb6aa2e0d41ee927b38d8b5e4f7ae5 [file] [log] [blame]
---
# ceilometer_service_playbook
- hosts: "{{ instance_name }}"
gather_facts: False
connection: ssh
user: ubuntu
vars:
host_name: {{ instance_hostname }}
host_private_ip: {{ private_ip }}
host_nat_ip: {{ nat_ip }}
ceilometer_enable_pub_sub: {{ ceilometer_enable_pub_sub }}
tasks:
- name: Fix /etc/hosts
become: yes
lineinfile:
dest=/etc/hosts
regexp="127.0.0.1 localhost"
line="127.0.0.1 localhost {{ instance_hostname }}"
- name : Adding Rabbitmq user
become: yes
shell : rabbitmqctl add_vhost /;rabbitmqctl add_user openstack "password";rabbitmqctl set_permissions openstack ".*" ".*" ".*"
- name: Coping keystone endpoint script
become: yes
template: src=/opt/xos/synchronizers/monitoring/templates/update-keystone-endpoints.py.j2 dest=/usr/local/bin/update-keystone-endpoints.py owner=root group=root mode=0777
- name: Changing keystone public endpoint in mysql
become: yes
shell: update-keystone-endpoints.py --username root --password password --host localhost --endpoint {{ private_ip }} --endpoint-type public
- name: Changing keystone admin endpoint in mysql
become: yes
shell: update-keystone-endpoints.py --username root --password password --host localhost --endpoint {{ private_ip }} --endpoint-type admin
- name: Enabling/Disabling kafka publishing
become: yes
template: src=/opt/xos/synchronizers/monitoring/templates/ceilometer_pipeline.yaml.j2 dest=/etc/ceilometer/pipeline.yaml owner=root group=root mode=0777
notify:
- restart ceilometer-agent-notification service
- name: Apply ceilometer kafka publisher patch until monitoring service is migrated to Newton release or later
become: yes
template: src=/opt/xos/synchronizers/monitoring/templates/kafka_broker.py dest=/usr/lib/python2.7/dist-packages/ceilometer/publisher/kafka_broker.py owner=root group=root mode=0777
notify:
- restart ceilometer-agent-notification service
handlers:
- name: restart ceilometer-agent-notification service
become: yes
service: name=ceilometer-agent-notification state=restarted