]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
ceph-prometheus: Allow installation via packages
authorZack Cerza <zack@redhat.com>
Fri, 20 Apr 2018 23:39:22 +0000 (18:39 -0500)
committerZack Cerza <zack@redhat.com>
Wed, 9 May 2018 21:52:35 +0000 (15:52 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
ansible/roles/ceph-prometheus/tasks/install_packages.yml [new file with mode: 0644]
ansible/roles/ceph-prometheus/tasks/main.yml
ansible/roles/ceph-prometheus/tasks/sanity.yml [deleted file]
ansible/roles/ceph-prometheus/tasks/setup_container.yml

diff --git a/ansible/roles/ceph-prometheus/tasks/install_packages.yml b/ansible/roles/ceph-prometheus/tasks/install_packages.yml
new file mode 100644 (file)
index 0000000..a4f9db2
--- /dev/null
@@ -0,0 +1,6 @@
+---
+- name: Install prometheus
+  package:
+    name: prometheus
+    state: latest
+  notify: Service handler
index 0f5761b241ab848807af11d61a2cd5a082cb1455..6c58e6114637510b2c703975177f7aa9d9e8fcae 100644 (file)
@@ -7,10 +7,6 @@
   meta: end_play
   when: backend.metrics != 'mgr' or backend.storage != 'prometheus'
 
-- include: sanity.yml
-  tags:
-    - sanity
-
 - name: Create prometheus data directory
   file:
     path: "{{ prometheus.data_dir }}"
 - include: setup_container.yml
   when: containerized
 
-- name: Ship systemd service
-  copy:
-    src: prometheus.service
-    dest: "/etc/systemd/system/"
-    owner: root
-    group: root
-    mode: 0644
-  notify: Service handler
+- import_tasks: install_packages.yml
+  when: not containerized
diff --git a/ansible/roles/ceph-prometheus/tasks/sanity.yml b/ansible/roles/ceph-prometheus/tasks/sanity.yml
deleted file mode 100644 (file)
index c091c28..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-- name: Fail when containerized is False
-  fail:
-    msg: "This role only supports a containerized deployment at this time"
-  when: not containerized
index 228b95c5801310dc7a79197a0c39ce0d26c01fd6..0991acc32cd784efd1896bc8091b96cfb675238b 100644 (file)
     keep_volumes: true
     pull: true
   notify: Service handler
+
+- name: Ship systemd service
+  copy:
+    src: prometheus.service
+    dest: "/etc/systemd/system/"
+    owner: root
+    group: root
+    mode: 0644
+  notify: Service handler