From: David Galloway Date: Thu, 31 Aug 2017 23:26:26 +0000 (-0400) Subject: Create long_running_cluster role X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5ef574af72e7afb7bd7ece7155763377b763611c;p=ceph-cm-ansible.git Create long_running_cluster role Signed-off-by: David Galloway --- 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