summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-07-05 19:50:27 +0200
committerChristian Pointner <equinox@spreadspace.org>2019-07-05 19:50:27 +0200
commit79d662045cba5c0c424f884e6de2ba11d90c530d (patch)
treefe9aa57cc78d56ca1e3e8f923cce447092a56d9d /common
parentmajor cleanup of chaos-at-home hosts (diff)
bugfixes and cleanup of vm/install
Diffstat (limited to 'common')
-rw-r--r--common/vm-install.yml16
1 files changed, 15 insertions, 1 deletions
diff --git a/common/vm-install.yml b/common/vm-install.yml
index fd1dbb20..5d29871b 100644
--- a/common/vm-install.yml
+++ b/common/vm-install.yml
@@ -8,7 +8,21 @@
name: "{{ vm_host }}"
inventory_dir: "{{ inventory_dir }}"
group: _vmhost_
- # TODO: add some sanity checks
+
+ - name: check if the installee belongs to the kvmguests group
+ fail:
+ msg: "the host '{{ hostname }}' does not belong to the group 'kvmguests'"
+ when:
+ - "'kvmguests' not in group_names"
+
+ - name: check if the vm_host belongs to the kvmhosts group
+ fail:
+ msg: "the host '{{ vm_host }}' does not belong to the group 'kvmhosts'"
+ when:
+ - "'kvmhosts' not in hostvars[vm_host].group_names"
+
+ # TODO: add some more sanity checks
+
- name: basic installation
hosts: _vmhost_