0f2ba3d2c9d44cd3a723bfca2a28d2140f5dd97d
[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: disable auto start
13   copy:
14     content: "#!/bin/sh\nexit 101"
15     dest: "/usr/sbin/policy-rc.d"
16     mode: 0755
17   when: ansible_os_family == "Debian"
18
19 - name: install ceilometer packages
20   action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
21   with_items: ceilometer_packages | union(packages_noarch)
22
23 - name: enable auto start
24   file:
25     path=/usr/sbin/policy-rc.d
26     state=absent
27   when: ansible_os_family == "Debian"
28
29 - name: update ceilometer configs
30   template:
31     src: ceilometer.conf.j2
32     dest: /etc/ceilometer/ceilometer.conf
33     backup: yes
34   notify: restart ceilometer service
35