Skip to content

Commit

Permalink
fix the dh_depoly_vm failure for ubuntu after rebase on vmware#489
Browse files Browse the repository at this point in the history
Signed-off-by: linhuali <lli@vmware.com>
  • Loading branch information
linhuali committed Aug 17, 2023
1 parent 09ada73 commit 2d9e68a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
10 changes: 0 additions & 10 deletions desktop_hypervisor/linux/dh_deploy_vm/deploy_vm_from_iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,6 @@
('CentOS' in dh_guest_unattend_install_conf) or
('Fedora' in dh_guest_unattend_install_conf))

# We can get the text "ubuntu login:" from the serial output when the installer begin to run
# but get this text again after finish installation and reboot
# When we get text "gdm.service", We are so close to the state "system is up" after rebooting.
- name: "Set autoinstall complete message for Ubuntu Desktop 20.04 ~ 22.10"
ansible.builtin.set_fact:
autoinstall_complete_msg: "gdm.service"
when:
- dh_guest_unattend_install_conf is defined
- dh_guest_unattend_install_conf is match('Ubuntu/Desktop/Ubiquity')

- name: "Wait autoinstall complete message appear in serial port output file"
include_tasks: ../../common/dh_host_get_log.yml
vars:
Expand Down
5 changes: 4 additions & 1 deletion desktop_hypervisor/linux/dh_deploy_vm/set_gos_iso_path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
ansible.builtin.set_fact:
dh_guest_iso_file_name: "{{ dh_guest_iso_path | ansible.builtin.basename }}"

- name: "Set fact of local ISO file path"
ansible.builtin.set_fact:
dh_guest_iso_local_path: "{{ local_cache }}/{{ dh_guest_iso_file_name }}"

# iso_http_server_path is configured
- name: "Download ISO file to Host/Local"
block:
Expand All @@ -24,7 +28,6 @@
- name: "Set fact of ISO file path"
ansible.builtin.set_fact:
dh_guest_iso_host_path: "{{ dh_host_download_path }}/{{ dh_guest_iso_file_name }}"
dh_guest_iso_local_path: "{{ local_cache }}/{{ dh_guest_iso_file_name }}"
- name: "Check guest OS image file status in Linux host"
include_tasks: ../../../linux/utils/get_file_stat_info.yml
vars:
Expand Down
20 changes: 15 additions & 5 deletions linux/deploy_vm/rebuild_unattend_install_iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,24 @@
src_iso_file_path: "{{ datastore_file_download_result.dest }}"
when: is_vsphere_env

- name: "Set fact of source ISO image file name and path at local"
ansible.builtin.set_fact:
src_iso_file_name: "{{ dh_guest_iso_local_path | basename }}"
src_iso_file_dir: "{{ dh_guest_iso_local_path | dirname }}"
src_iso_file_path: "{{ dh_guest_iso_local_path }}"
- name: "Set fact of source ISO image file name and path"
when:
- not is_vsphere_env
- dh_guest_iso_path is defined and dh_guest_iso_path
block:
- name: "Set fact of source ISO image file dir at local"
ansible.builtin.set_fact:
src_iso_file_dir: "{{ dh_guest_iso_local_path | dirname }}"
- name: "Set fact of source ISO image file name and path at local"
when: iso_http_server_path is defined and iso_http_server_path
ansible.builtin.set_fact:
src_iso_file_name: "{{ dh_guest_iso_local_path | basename }}"
src_iso_file_path: "{{ dh_guest_iso_local_path }}"
- name: "Set fact of source ISO image file name and path at host"
when: iso_http_server_path is undefined or not iso_http_server_path
ansible.builtin.set_fact:
src_iso_file_name: "{{ dh_guest_iso_path | basename }}"
src_iso_file_path: "{{ dh_guest_iso_path }}"

- name: "Set fact of unattend install config file name"
ansible.builtin.set_fact:
Expand Down

0 comments on commit 2d9e68a

Please sign in to comment.