From 17077868e615fa7115abdb03a5af4662ab0a3679 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 23 Apr 2020 01:24:38 +0200 Subject: refactor all install roles ans playbooks to work with new variable install_hostname --- common/cloud-install.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common/cloud-install.yml') diff --git a/common/cloud-install.yml b/common/cloud-install.yml index e80bfed0..57ebc9e6 100644 --- a/common/cloud-install.yml +++ b/common/cloud-install.yml @@ -1,12 +1,12 @@ --- - name: basic installation - hosts: "{{ hostname }}" + hosts: "{{ install_hostname }}" gather_facts: no roles: - role: cloud/install - name: wait for newly installed machine to start up - hosts: "{{ hostname }}" + hosts: "{{ install_hostname }}" gather_facts: no tasks: ## TODO: find a better way to fetch host key of new VMs @@ -22,17 +22,17 @@ ansible_ssh_extra_args: "" - name: run post install roles - hosts: "{{ hostname }}" + hosts: "{{ install_hostname }}" pre_tasks: - name: make sure to update cached facts setup: roles: - role: cloud/post-install -- import_playbook: "../{{ hostenv }}/{{ hostname }}.yml" +- import_playbook: "../{{ install_environment }}/{{ hostvars[install_hostname].install_playbook | default(install_hostname) }}.yml" - name: reboot and wait for machine come back - hosts: "{{ hostname }}" + hosts: "{{ install_hostname }}" gather_facts: no roles: - role: reboot-and-wait -- cgit v1.2.3