Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sti-cluster
ansible_node_exporter
Commits
e056f334
Commit
e056f334
authored
Jul 16, 2021
by
Pullyvan Krishnamoorthy
Browse files
add Centos Support
parent
d9e49c4a
Changes
3
Hide whitespace changes
Inline
Side-by-side
tasks/centos.yml
0 → 100644
View file @
e056f334
---
-
name
:
create the node_exporter account
user
:
create_home
:
false
name
:
node_exporter
shell
:
"
/bin/false"
-
name
:
Download node_exporter
get_url
:
url
:
https://copr.fedorainfracloud.org/coprs/ibotty/prometheus-exporters/repo/epel-7/ibotty-prometheus-exporters-epel-7.repo
dest
:
/etc/yum.repos.d/_copr_ibotty-prometheus-exporters.repo
-
name
:
Install the 'node_exporter'
yum
:
name
:
"
node_exporter"
state
:
present
-
name
:
deploy the service definition file
template
:
dest
:
/etc/systemd/system/node_exporter.service
src
:
node_exporter_centos.service
-
name
:
deploy additional service options config file
template
:
dest
:
/etc/nodeexport.conf
src
:
nodeexport.conf
-
name
:
reload systemd to take the new service into account
systemd
:
daemon_reload
:
yes
enabled
:
yes
name
:
node_exporter
state
:
started
tasks/debian.yml
0 → 100644
View file @
e056f334
---
-
name
:
create the node_exporter account
user
:
create_home
:
false
name
:
node_exporter
shell
:
"
/bin/false"
-
name
:
unpack node_exporter
unarchive
:
remote_src
:
yes
src
:
https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
dest
:
/tmp
-
name
:
move the node_exporter to the final destination
copy
:
dest
:
/usr/local/bin/node_exporter
src
:
/tmp/node_exporter-0.18.1.linux-amd64/node_exporter
owner
:
node_exporter
group
:
node_exporter
mode
:
"
u+x"
remote_src
:
yes
-
name
:
deploy the service definition file
template
:
dest
:
/etc/systemd/system/node_exporter.service
src
:
node_exporter.service
-
name
:
deploy additional service options config file
template
:
dest
:
/etc/nodeexport.conf
src
:
nodeexport.conf
-
name
:
reload systemd to take the new service into account
systemd
:
daemon_reload
:
yes
enabled
:
yes
name
:
node_exporter
state
:
started
templates/node_exporter_centos.service
0 → 100644
View file @
e056f334
[Unit]
Description
=
Node Exporter
Wants
=
network-online.target
After
=
network-online.target
[Service]
User
=
node_exporter
Group
=
node_exporter
Type
=
simple
EnvironmentFile
=
/etc/nodeexport.conf
ExecStart
=
/usr/sbin/node_exporter $ARG1 $ARG2 $ARG3 $ARG5 $ARG6 $ARG7
[Install]
WantedBy
=
multi-user.target
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment