Skip to content
Snippets Groups Projects
Commit 680c3d35 authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Create the initial role for node_exporter installation and setup

parent 2725c733
No related tags found
No related merge requests found
# rc-node_exporter # rc-node_exporter
To install the node_exporter on a machine, follow these steps:
* Clone this repo to the machine
* From withing the cloned git repo run the following commands:
```shell
ansible-playbook -i "localhost," node_exporter_build.yaml -b
```
## Getting started ## Getting started
......
---
# Destination on remote server to move install-node_exporter.sh script to
install-node_exporter_dest: "/tmp"
\ No newline at end of file
---
- hosts: localhost
connection: local
become: yes
roles:
- { name: 'install_node_exporter', tags: 'install_node_exporter' }
\ No newline at end of file
File moved
---
- name: Copy install-node_exporter.sh
copy:
src: "install-node_exporter.sh"
dest: "{{ install-node_exporter_dest }}/install-node_exporter.sh"
owner: root
group: root
mode: 0700
- name: Copy node_exporter.service
copy:
src: "node_exporter.service"
dest: "/etc/systemd/system/install-node_exporter.sh"
- name: Run install-node_exporter.sh as root
shell: "{{ install-node_exporter_dest }}/install-node_exporter.sh"
become: yes
- name: Enable node_exporter.service
systemd:
name: node_exporter.service
state: enabled
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment