Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
Use virsh via command moduleto avoid SASL errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tiraboschi committed Nov 29, 2019
1 parent 13d3fe2 commit 7b3545f
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions tasks/create_target_vm/03_hosted_engine_final_tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@
- debug: var=he_virtio_disk_path
- debug: var=he_metadata_disk_path
- name: Shutdown local VM
virt:
name: "{{ he_vm_name }}Local"
state: shutdown
uri: 'qemu:///system?authfile={{ he_libvirt_authfile }}'
command: "virsh -c qemu:///system?authfile={{ he_libvirt_authfile }} shutdown {{ he_vm_name }}Local"
environment: "{{ he_cmd_lang }}"
- name: Wait for local VM shutdown
command: virsh -r domstate "{{ he_vm_name }}Local"
environment: "{{ he_cmd_lang }}"
Expand All @@ -102,20 +100,14 @@
delay: 5
- debug: var=dominfo_out
- name: Undefine local VM
virt:
name: "{{ he_vm_name }}Local"
command: undefine
uri: 'qemu:///system?authfile={{ he_libvirt_authfile }}'
command: "virsh -c qemu:///system?authfile={{ he_libvirt_authfile }} undefine {{ he_vm_name }}Local"
environment: "{{ he_cmd_lang }}"
- name: Update libvirt default network configuration, destroy
virt_net:
command: destroy
name: default
uri: 'qemu:///system?authfile={{ he_libvirt_authfile }}'
command: "virsh -c qemu:///system?authfile={{ he_libvirt_authfile }} net-destroy default"
environment: "{{ he_cmd_lang }}"
- name: Update libvirt default network configuration, undefine
virt_net:
command: undefine
name: default
uri: 'qemu:///system?authfile={{ he_libvirt_authfile }}'
command: "virsh -c qemu:///system?authfile={{ he_libvirt_authfile }} net-undefine default"
environment: "{{ he_cmd_lang }}"
ignore_errors: true
- name: Detect ovirt-hosted-engine-ha version
command: >-
Expand Down

0 comments on commit 7b3545f

Please sign in to comment.