From a9c5560dcca18a0df93341289087a9585fbca29c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 1 Jan 2022 17:13:26 +0100 Subject: add new openwrt-based testvm add new vm-deploy playbook and script --- chaos-at-home/image-generate.yml | 13 +++++++++++++ chaos-at-home/vm-deploy.yml | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 chaos-at-home/vm-deploy.yml (limited to 'chaos-at-home') diff --git a/chaos-at-home/image-generate.yml b/chaos-at-home/image-generate.yml index a7d38149..4c2f5fb9 100644 --- a/chaos-at-home/image-generate.yml +++ b/chaos-at-home/image-generate.yml @@ -5,3 +5,16 @@ gather_facts: no roles: - role: "{{ install_distro }}/image" + post_tasks: + - pause: + seconds: 0 + prompt: | + The resulting images can be found here: + + {% for host in play_hosts %} + {{ host }}: + {% for image in hostvars[host].output_images %} + - {{ image }} + {% endfor %} + + {% endfor %} diff --git a/chaos-at-home/vm-deploy.yml b/chaos-at-home/vm-deploy.yml new file mode 100644 index 00000000..33268b6d --- /dev/null +++ b/chaos-at-home/vm-deploy.yml @@ -0,0 +1,18 @@ +--- +- name: generate os image + hosts: "{{ install_hostname }}" + connection: local + gather_facts: no + roles: + - role: "{{ install_distro }}/image" + +- name: cook variables for host + hosts: "{{ install_hostname }}" + gather_facts: no + tasks: + - set_fact: + install: "{{ install | default({}) }}" + network: "{{ network | default({}) }}" + vm_host: "{{ vm_host | default({}) }}" + +- import_playbook: ../common/vm-deploy.yml -- cgit v1.2.3