|
13 | 13 | # See the License for the specific language governing permissions and
|
14 | 14 | # limitations under the License.
|
15 | 15 |
|
16 |
| -- name: create rocketmq exporter deploy directory |
| 16 | +- name: create exporter deploy directory |
17 | 17 | file:
|
18 | 18 | path: "{{ rocketmq_exporter_deploy_directory }}"
|
19 | 19 | state: directory
|
20 | 20 | recurse: yes
|
21 | 21 |
|
22 |
| -- name: download rocketmq exporter |
| 22 | +- name: download Apache Rocketmq exporter |
23 | 23 | get_url:
|
24 | 24 | url: "{{ rocketmq_exporter_download_url }}"
|
25 | 25 | dest: "{{ rocketmq_exporter_deploy_directory }}"
|
26 | 26 | mode: 0750
|
27 | 27 |
|
28 |
| -- name: copy mqexportershutdown script |
| 28 | +- name: copy exporter shutdown script |
29 | 29 | copy:
|
30 | 30 | src: mqexportershutdown.sh
|
31 | 31 | dest: "{{ rocketmq_exporter_deploy_directory }}"
|
32 | 32 | mode: 0750
|
33 | 33 |
|
34 |
| -- name: copy mqexporter service script |
| 34 | +- name: copy exporter start script |
35 | 35 | template:
|
36 |
| - src: mqexporter.service |
37 |
| - dest: /usr/lib/systemd/system |
| 36 | + src: mqexporter.sh.j2 |
| 37 | + dest: "{{rocketmq_exporter_deploy_directory}}/mqexporter.sh" |
38 | 38 | mode: 0750
|
39 | 39 |
|
40 |
| -- name: replace and copy mqexporter script |
| 40 | +- name: add exporter boot mechanism |
41 | 41 | template:
|
42 |
| - src: mqexporter.sh.j2 |
43 |
| - dest: "{{rocketmq_exporter_deploy_directory}}/mqexporter.sh" |
| 42 | + src: mqexporter.service |
| 43 | + dest: /usr/lib/systemd/system |
44 | 44 | mode: 0750
|
45 | 45 |
|
46 |
| -- name: check rocketmq exporter status |
| 46 | +- name: check exporter status |
47 | 47 | shell: source /etc/profile && jps -lvVm | grep rocketmq-exporter | wc -l
|
48 | 48 | register: status_result
|
49 | 49 |
|
50 | 50 | - debug:
|
51 | 51 | msg: "{{ status_result }}"
|
52 | 52 |
|
53 |
| -- name: start rocketmq exporter |
| 53 | +- name: start exporter |
54 | 54 | shell: |
|
55 | 55 | source /etc/profile
|
56 | 56 | systemctl disable mqexporter
|
|
0 commit comments