diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-07-05 19:50:27 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-07-05 19:50:27 +0200 |
commit | 79d662045cba5c0c424f884e6de2ba11d90c530d (patch) | |
tree | fe9aa57cc78d56ca1e3e8f923cce447092a56d9d /common/vm-install.yml | |
parent | major cleanup of chaos-at-home hosts (diff) |
bugfixes and cleanup of vm/install
Diffstat (limited to 'common/vm-install.yml')
-rw-r--r-- | common/vm-install.yml | 16 |
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_ |