From 9d06702fc2c0cb83fca501635e94c075b29ad91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 7 Mar 2014 11:20:48 +0100 Subject: [PATCH] Check system and architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the system is not Linux and the architecture is not x86 Ansible will fail and exit. Signed-off-by: Sébastien Han --- roles/common/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 55fcef580..948f1dd94 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -2,6 +2,14 @@ ## Common to all the ceph nodes # +- name: Fail on unsupported system + fail: msg="System not supported {{ ansible_system }}" + when: ansible_system not in ['Linux'] + +- name: Fail on unsupported architecture + fail: msg="Architeture not supported {{ ansible_architectore }}" + when: ansible_architecture not in ['x86_64'] + - name: Install dependancies apt: pkg={{ item }} state=installed update_cache=yes # we update the cache just in case... with_items: