ansible-playbook(node_exporter)

roles/node_exporter/tasks/main.yml

- name: copy package
copy: src=node_exporter-0.17.0.linux-amd64.tar.gz dest=/usr/local/node_exporter-0.17.0.linux-amd64.tar.gz
tags: cppkg

- name: tar node_exporter
shell: cd /usr/local;tar -xvf node_exporter-0.17.0.linux-amd64.tar.gz

- name: install node_export
shell: nohup /usr/local/node_exporter-0.17.0.linux-amd64/node_exporter &

 

cat node_exporter.yaml

- hosts: tdb2
remote_user: root
roles:
- node_exporter

posted @ 2019-03-01 17:38  suminem  阅读(668)  评论(0编辑  收藏  举报