[ansible][default_plugins] Update how the default plugins are enabled
[barometer.git] / docker / ansible / roles / config_files / tasks / default_read_import.yml
1 #Copyright 2018 OPNFV and Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 ---
15
16 - name: copy default template to system
17   template:
18     src: default_read_plugins.conf.j2
19     dest: "{{ config_file_dir }}/default_read_plugins.conf"
20   tags:
21    - always
22
23 - name: enable contextswitch  plugin
24   replace:
25       path: "{{ config_file_dir }}/default_read_plugins.conf"
26       regexp: '(\s+)#LoadPlugin contextswitch(\s+.*)?$'
27       replace: '\1LoadPlugin contextswitch\2'
28   tags:
29     - en_default_all
30     - contextswitch
31
32 - name: enable cpu plugin
33   replace:
34       path: "{{ config_file_dir }}/default_read_plugins.conf"
35       regexp: '(\s+)#LoadPlugin cpu(\s+.*)?$'
36       replace: '\1LoadPlugin cpu\2'
37   tags:
38     - en_default_all
39     - cpu
40
41 - name: enable cpufreq plugin
42   replace:
43       path: "{{ config_file_dir }}/default_read_plugins.conf"
44       regexp: '(\s+)#LoadPlugin cpufreq(\s+.*)?$'
45       replace: '\1LoadPlugin cpufreq\2'
46   tags:
47     - en_default_all
48     - cpufreq
49
50 - name: enable df plugin
51   replace:
52       path: "{{ config_file_dir }}/default_read_plugins.conf"
53       regexp: '(\s+)#LoadPlugin df(\s+.*)?$'
54       replace: '\1LoadPlugin df\2'
55   tags:
56     - en_default_all
57     - df
58
59 - name: enable disk plugin
60   replace:
61       path: "{{ config_file_dir }}/default_read_plugins.conf"
62       regexp: '(\s+)#LoadPlugin disk(\s+.*)?$'
63       replace: '\1LoadPlugin disk\2'
64   tags:
65     - en_default_all
66     - disk
67
68 - name: enable ethstat plugin
69   replace:
70       path: "{{ config_file_dir }}/default_read_plugins.conf"
71       regexp: '(\s+)#LoadPlugin ethstat(\s+.*)?$'
72       replace: '\1LoadPlugin ethstat\2'
73   tags:
74     - en_default_all
75     - ethstat
76
77 - name: enable ipc plugin
78   replace:
79       path: "{{ config_file_dir }}/default_read_plugins.conf"
80       regexp: '(\s+)#LoadPlugin ipc(\s+.*)?$'
81       replace: '\1LoadPlugin ipc\2'
82   tags:
83     - en_default_all
84     - ipc
85
86 - name: enable irq plugin
87   replace:
88       path: "{{ config_file_dir }}/default_read_plugins.conf"
89       regexp: '(\s+)#LoadPlugin irq(\s+.*)?$'
90       replace: '\1LoadPlugin irq\2'
91   tags:
92     - en_default_all
93     - irq
94
95 - name: enable load plugin
96   replace:
97       path: "{{ config_file_dir }}/default_read_plugins.conf"
98       regexp: '(\s+)#LoadPlugin load(\s+.*)?$'
99       replace: '\1LoadPlugin load\2'
100   tags:
101     - en_default_all
102     - load
103
104 - name: enable memory plugin
105   replace:
106       path: "{{ config_file_dir }}/default_read_plugins.conf"
107       regexp: '(\s+)#LoadPlugin memory(\s+.*)?$'
108       replace: '\1LoadPlugin memory\2'
109   tags:
110     - en_default_all
111     - memory
112
113 - name: enable numa plugin
114   replace:
115       path: "{{ config_file_dir }}/default_read_plugins.conf"
116       regexp: '(\s+)#LoadPlugin numa(\s+.*)?$'
117       replace: '\1LoadPlugin numa\2'
118   tags:
119     - en_default_all
120     - numa
121
122 - name: enable processes plugin
123   replace:
124       path: "{{ config_file_dir }}/default_read_plugins.conf"
125       regexp: '(\s+)#LoadPlugin processes(\s+.*)?$'
126       replace: '\1LoadPlugin processes\2'
127   tags:
128     - en_default_all
129     - processes
130
131 - name: enable swap plugin
132   replace:
133       path: "{{ config_file_dir }}/default_read_plugins.conf"
134       regexp: '(\s+)#LoadPlugin swap(\s+.*)?$'
135       replace: '\1LoadPlugin swap\2'
136   tags:
137     - en_default_all
138     - swap
139
140 - name: enable turbostat plugin
141   replace:
142       path: "{{ config_file_dir }}/default_read_plugins.conf"
143       regexp: '(\s+)#LoadPlugin turbostat(\s+.*)?$'
144       replace: '\1LoadPlugin turbostat\2'
145   tags:
146     - en_default_all
147     - turbostat
148
149 - name: enable uptime plugin
150   replace:
151       path: "{{ config_file_dir }}/default_read_plugins.conf"
152       regexp: '(\s+)#LoadPlugin uptime(\s+.*)?$'
153       replace: '\1LoadPlugin uptime\2'
154   tags:
155     - en_default_all
156     - uptime