From fbca1591e68a1223719c177be4750c3bb5a88177 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 7 Jun 2020 16:46:53 +0200 Subject: fix vm install variable cooking once more --- chaos-at-home/cloud-install.yml | 2 +- chaos-at-home/usb-install.yml | 2 +- chaos-at-home/vm-install.yml | 9 ++++++++- dan/cloud-install.yml | 2 +- dan/usb-install.yml | 2 +- dan/vm-install.yml | 10 +++++++++- inventory/host_vars/ch-hroottest-obsd.yml | 2 -- spreadspace/cloud-install.yml | 2 +- spreadspace/usb-install.yml | 2 +- spreadspace/vm-install.yml | 10 +++++++++- 10 files changed, 32 insertions(+), 11 deletions(-) diff --git a/chaos-at-home/cloud-install.yml b/chaos-at-home/cloud-install.yml index 167cf458..31c757a1 100644 --- a/chaos-at-home/cloud-install.yml +++ b/chaos-at-home/cloud-install.yml @@ -1,5 +1,5 @@ --- -- name: setup variables +- name: cook variables for host hosts: "{{ install_hostname }}" gather_facts: no tasks: diff --git a/chaos-at-home/usb-install.yml b/chaos-at-home/usb-install.yml index ab455ff7..04bf2594 100644 --- a/chaos-at-home/usb-install.yml +++ b/chaos-at-home/usb-install.yml @@ -1,5 +1,5 @@ --- -- name: setup variables +- name: cook variables for host hosts: "{{ install_hostname }}" gather_facts: no tasks: diff --git a/chaos-at-home/vm-install.yml b/chaos-at-home/vm-install.yml index 7ca11b58..4d42946f 100644 --- a/chaos-at-home/vm-install.yml +++ b/chaos-at-home/vm-install.yml @@ -1,5 +1,5 @@ --- -- name: setup variables +- name: cook variables for guest hosts: "{{ install_hostname }}" gather_facts: no tasks: @@ -8,4 +8,11 @@ network_cooked: "{{ network }}" vm_host_cooked: "{{ vm_host }}" +- name: cook variables for host + hosts: "{{ hostvars[install_hostname].vm_host }}" + gather_facts: no + tasks: + - set_fact: + vm_host_cooked: "{{ vm_host }}" + - import_playbook: ../common/vm-install.yml diff --git a/dan/cloud-install.yml b/dan/cloud-install.yml index 167cf458..31c757a1 100644 --- a/dan/cloud-install.yml +++ b/dan/cloud-install.yml @@ -1,5 +1,5 @@ --- -- name: setup variables +- name: cook variables for host hosts: "{{ install_hostname }}" gather_facts: no tasks: diff --git a/dan/usb-install.yml b/dan/usb-install.yml index ab455ff7..04bf2594 100644 --- a/dan/usb-install.yml +++ b/dan/usb-install.yml @@ -1,5 +1,5 @@ --- -- name: setup variables +- name: cook variables for host hosts: "{{ install_hostname }}" gather_facts: no tasks: diff --git a/dan/vm-install.yml b/dan/vm-install.yml index 405e14db..4d42946f 100644 --- a/dan/vm-install.yml +++ b/dan/vm-install.yml @@ -1,10 +1,18 @@ --- -- name: setup variables +- name: cook variables for guest hosts: "{{ install_hostname }}" gather_facts: no tasks: - set_fact: install_cooked: "{{ install }}" network_cooked: "{{ network }}" + vm_host_cooked: "{{ vm_host }}" + +- name: cook variables for host + hosts: "{{ hostvars[install_hostname].vm_host }}" + gather_facts: no + tasks: + - set_fact: + vm_host_cooked: "{{ vm_host }}" - import_playbook: ../common/vm-install.yml diff --git a/inventory/host_vars/ch-hroottest-obsd.yml b/inventory/host_vars/ch-hroottest-obsd.yml index c8af9fe1..292e8101 100644 --- a/inventory/host_vars/ch-hroottest-obsd.yml +++ b/inventory/host_vars/ch-hroottest-obsd.yml @@ -20,8 +20,6 @@ install: network: nameservers: "{{ hostvars[vm_host].vm_host.network.dns }}" domain: "{{ host_domain }}" - systemd_link: - interfaces: "{{ install.interfaces }}" primary: interface: vio0 ip: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr(hostvars[vm_host].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address') }}" diff --git a/spreadspace/cloud-install.yml b/spreadspace/cloud-install.yml index 167cf458..31c757a1 100644 --- a/spreadspace/cloud-install.yml +++ b/spreadspace/cloud-install.yml @@ -1,5 +1,5 @@ --- -- name: setup variables +- name: cook variables for host hosts: "{{ install_hostname }}" gather_facts: no tasks: diff --git a/spreadspace/usb-install.yml b/spreadspace/usb-install.yml index ab455ff7..04bf2594 100644 --- a/spreadspace/usb-install.yml +++ b/spreadspace/usb-install.yml @@ -1,5 +1,5 @@ --- -- name: setup variables +- name: cook variables for host hosts: "{{ install_hostname }}" gather_facts: no tasks: diff --git a/spreadspace/vm-install.yml b/spreadspace/vm-install.yml index 405e14db..4d42946f 100644 --- a/spreadspace/vm-install.yml +++ b/spreadspace/vm-install.yml @@ -1,10 +1,18 @@ --- -- name: setup variables +- name: cook variables for guest hosts: "{{ install_hostname }}" gather_facts: no tasks: - set_fact: install_cooked: "{{ install }}" network_cooked: "{{ network }}" + vm_host_cooked: "{{ vm_host }}" + +- name: cook variables for host + hosts: "{{ hostvars[install_hostname].vm_host }}" + gather_facts: no + tasks: + - set_fact: + vm_host_cooked: "{{ vm_host }}" - import_playbook: ../common/vm-install.yml -- cgit v1.2.3