aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoransible_admin <capsul@cyberia.club>2020-12-16 22:07:49 +0000
committeransible_admin <capsul@cyberia.club>2020-12-16 22:07:49 +0000
commitfbfca19e69e248a5b5de4cd75f0063ea00978c14 (patch)
tree81fe9a0231001a796bc887fee250240f8dff4200
parent06af234bedff0b6cb85ef5981eeea68bafa28697 (diff)
downloadops-handbook-fbfca19e69e248a5b5de4cd75f0063ea00978c14.tar.gz
ops-handbook-fbfca19e69e248a5b5de4cd75f0063ea00978c14.tar.bz2
Add prometheus to all nodes
-rw-r--r--ansible/group_vars/all1
-rw-r--r--ansible/roles/common/tasks/main.yml37
2 files changed, 20 insertions, 18 deletions
diff --git a/ansible/group_vars/all b/ansible/group_vars/all
index cf07c3e..4fadc18 100644
--- a/ansible/group_vars/all
+++ b/ansible/group_vars/all
@@ -17,3 +17,4 @@ common_utilities:
- tree
- curl
- wget
+ - prometheus-node-exporter@edge-community
diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml
index 1416ffa..50f5203 100644
--- a/ansible/roles/common/tasks/main.yml
+++ b/ansible/roles/common/tasks/main.yml
@@ -1,4 +1,22 @@
---
+- name: Configure repos
+ template:
+ src: apk_repositories.j2
+ dest: /etc/apk/repositories
+ owner: root
+ group: root
+ mode: 0644
+ notify: update-apk
+
+- name: Configure srht signing key
+ template:
+ src: alpine@sr.ht.rsa.pub.j2
+ dest: /etc/apk/keys/alpine@sr.ht.rsa.pub
+ owner: root
+ group: root
+ mode: 0644
+ notify: update-apk
+
- name: Add common utilities
package:
name: "{{ item }}"
@@ -28,6 +46,7 @@
- crond
- syslog
- klogd
+ - node-exporter
- name: Lock down cyberian account to just ansible
template:
@@ -60,24 +79,6 @@
group: root
mode: 0644
notify: restart-sshd
-
-- name: Configure repos
- template:
- src: apk_repositories.j2
- dest: /etc/apk/repositories
- owner: root
- group: root
- mode: 0644
- notify: update-apk
-
-- name: Configure srht signing key
- template:
- src: alpine@sr.ht.rsa.pub.j2
- dest: /etc/apk/keys/alpine@sr.ht.rsa.pub
- owner: root
- group: root
- mode: 0644
- notify: update-apk
- name: Configure Sudoers
# what were we replacing again?