diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-01-06 19:22:14 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-01-06 19:22:14 +0100 |
commit | e3d0be5df3a8a43b19da0bb814c8174048cfc79f (patch) | |
tree | adf9917fb0dbe94328c465da5e46b96317a3870d /roles/vm/guest/deploy/tasks | |
parent | Merge branch 'topic/openwrt-deploy' (diff) |
split up vm/define into remove and create
Diffstat (limited to 'roles/vm/guest/deploy/tasks')
-rw-r--r-- | roles/vm/guest/deploy/tasks/main.yml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/roles/vm/guest/deploy/tasks/main.yml b/roles/vm/guest/deploy/tasks/main.yml index f203fdff..aa27b59d 100644 --- a/roles/vm/guest/deploy/tasks/main.yml +++ b/roles/vm/guest/deploy/tasks/main.yml @@ -12,6 +12,10 @@ path: "{{ vm_deploy_primary_disk.path | dirname }}" state: directory +- name: remove vm if it already exists + import_role: + name: vm/guest/remove + ## TODO: actually call this directly and make file replacement atomic!! ## Probably by writing and action plugin based on this: https://github.com/socratesx/Ansible-Decompress - name: copy disk image @@ -23,9 +27,8 @@ When done press ENTER to continue or CTRL-C then A to abort. -- name: define vm +- name: create vm vars: - vm_define_installer: no - delegate_to: "{{ vm_host.name }}" + vm_create_installer: no import_role: - name: vm/guest/define + name: vm/guest/create |