From 5ef574af72e7afb7bd7ece7155763377b763611c Mon Sep 17 00:00:00 2001 From: David Galloway Date: Thu, 31 Aug 2017 19:26:26 -0400 Subject: [PATCH] Create long_running_cluster role Signed-off-by: David Galloway --- long_running_cluster.yml | 12 ++++++++++++ roles/long_running_cluster/tasks/main.yml | 10 ++++++++++ 2 files changed, 22 insertions(+) create mode 100644 long_running_cluster.yml create mode 100644 roles/long_running_cluster/tasks/main.yml diff --git a/long_running_cluster.yml b/long_running_cluster.yml new file mode 100644 index 0000000..f9eabf7 --- /dev/null +++ b/long_running_cluster.yml @@ -0,0 +1,12 @@ +--- +- hosts: long_running_cluster + tasks: + - name: Pull in vars from common role + include_vars: "roles/common/vars/{{ ansible_pkg_mgr }}_systems.yml" + +- hosts: long_running_cluster + become: true + roles: + - long_running_cluster + handlers: + - import_tasks: roles/common/handlers/main.yml diff --git a/roles/long_running_cluster/tasks/main.yml b/roles/long_running_cluster/tasks/main.yml new file mode 100644 index 0000000..0921fcc --- /dev/null +++ b/roles/long_running_cluster/tasks/main.yml @@ -0,0 +1,10 @@ +--- +# We only need to install nagios checks on MON nodes +- name: Check if MON node + command: "systemctl status ceph-mon@{{ ansible_hostname }}" + ignore_errors: true + changed_when: false + register: mon_service_status + +- import_tasks: nagios.yml + when: mon_service_status.rc == 0 -- 2.39.5