raghunath dudyala | a927d56 | 2016-09-28 14:04:13 +0530 | [diff] [blame] | 1 | --- |
| 2 | # ceilometer_service_playbook |
| 3 | - hosts: "{{ instance_name }}" |
| 4 | gather_facts: False |
| 5 | connection: ssh |
| 6 | user: ubuntu |
| 7 | sudo: yes |
| 8 | vars: |
| 9 | host_name: {{ instance_hostname }} |
| 10 | host_private_ip: {{ private_ip }} |
| 11 | host_nat_ip: {{ nat_ip }} |
| 12 | tasks: |
| 13 | |
| 14 | - name: Fix /etc/hosts |
| 15 | lineinfile: |
| 16 | dest=/etc/hosts |
| 17 | regexp="127.0.0.1 localhost" |
| 18 | line="127.0.0.1 localhost {{ instance_hostname }}" |
| 19 | |
| 20 | - name : Adding Rabbitmq user |
| 21 | shell : rabbitmqctl add_user openstack "password";rabbitmqctl set_permissions openstack ".*" ".*" ".*" |
| 22 | |
| 23 | - name: Coping keystone endpoint script |
| 24 | 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 |
| 25 | |
| 26 | - name: Changing keystone public endpoint in mysql |
| 27 | shell: update-keystone-endpoints.py --username root --password password --host localhost --endpoint {{ private_ip }} --endpoint-type public |
| 28 | |
| 29 | - name: Changing keystone admin endpoint in mysql |
| 30 | shell: update-keystone-endpoints.py --username root --password password --host localhost --endpoint {{ private_ip }} --endpoint-type admin |