vmware builds
This commit is contained in:
34
roles/oatakan.rhel_template_build/tasks/virtualbox.yml
Normal file
34
roles/oatakan.rhel_template_build/tasks/virtualbox.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
- name: Get VirtualBox version.
|
||||
slurp:
|
||||
src: /home/{{ local_account_username }}/.vbox_version
|
||||
register: get_virtualbox_version
|
||||
|
||||
- name: Set VirtualBox version.
|
||||
set_fact:
|
||||
virtualbox_version: "{{ get_virtualbox_version['content'] | b64decode }}"
|
||||
|
||||
- name: Mount VirtualBox guest additions ISO.
|
||||
mount:
|
||||
name: /tmp/vbox
|
||||
src: "/home/{{ local_account_username }}/VBoxGuestAdditions_{{ virtualbox_version }}.iso"
|
||||
opts: loop
|
||||
state: mounted
|
||||
fstype: iso9660
|
||||
|
||||
- name: Run VirtualBox guest additions installation.
|
||||
shell: sh /tmp/vbox/VBoxLinuxAdditions.run
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Unmount VirtualBox guest additions ISO.
|
||||
mount:
|
||||
name: /tmp/vbox
|
||||
src: "/home/{{ local_account_username }}/VBoxGuestAdditions_{{ virtualbox_version }}.iso"
|
||||
state: absent
|
||||
fstype: iso9660
|
||||
|
||||
- name: Delete VirtualBox guest additions ISO.
|
||||
file:
|
||||
path: "/home/{{ local_account_username }}/VBoxGuestAdditions_{{ virtualbox_version }}.iso"
|
||||
state: absent
|
||||
Reference in New Issue
Block a user