b429d65bf95e7ed5fad5f6eb57bdfa74895591d6
[compass4nfv.git] /
1 ##############################################################################
2 # Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 ---
10 - include_vars: "{{ ansible_os_family }}.yml"
11
12 - name: copy configs
13   template:
14     src: "{{ item }}"
15     dest: /opt/os_templates
16   with_items:
17    - ceilometer.conf.j2
18    - nova.conf.j2
19
20 - name: update ceilometer configs
21   shell: crudini --merge {{ item.dest }} < /opt/os_templates/{{ item.src }}
22   with_items:
23    - src: nova.conf.j2
24      dest: /etc/nova/nova.conf
25   notify: restart nova service
26
27 - name: delete config
28   file:
29     path: /opt/os_templates/nova.conf.j2
30     state: absent
31
32 - name: write services to monitor list
33   lineinfile: dest=/opt/service create=yes line='{{ item }}'
34   with_items: ceilometer_services
35
36 - meta: flush_handlers
37