mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-06 09:08:26 +07:00
Extract instead of mounting the OS ISO file
Avoid using privileged container or root permission on local machine
This commit is contained in:
parent
b7dc3379ad
commit
56dd371fa8
@ -4,7 +4,6 @@ default: run
|
|||||||
|
|
||||||
run:
|
run:
|
||||||
ansible-playbook \
|
ansible-playbook \
|
||||||
--ask-become-pass \
|
|
||||||
--inventory hosts.ini \
|
--inventory hosts.ini \
|
||||||
main.yml
|
main.yml
|
||||||
|
|
||||||
|
@ -15,18 +15,14 @@
|
|||||||
- name: Download ISO
|
- name: Download ISO
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ iso_url }}"
|
url: "{{ iso_url }}"
|
||||||
dest: "{{ role_path }}/build/images/centos8.iso"
|
dest: "{{ role_path }}/build/images/CentOS-8.3.2011-x86_64-dvd1.iso"
|
||||||
checksum: "{{ iso_checksum }}"
|
checksum: "{{ iso_checksum }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
register: iso
|
||||||
|
|
||||||
- name: Mount the ISO
|
- name: Extract the ISO
|
||||||
mount:
|
command: "xorriso -osirrox on -indev {{ iso.dest }} -extract / {{ role_path }}/build/mnt"
|
||||||
src: "{{ role_path }}/build/images/centos8.iso"
|
creates: "{{ role_path }}/build/mnt/.treeinfo"
|
||||||
path: "{{ role_path }}/build/mnt"
|
|
||||||
fstype: iso9660
|
|
||||||
opts: loop,ro
|
|
||||||
state: mounted
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Copy configs
|
- name: Copy configs
|
||||||
copy:
|
copy:
|
||||||
|
@ -7,9 +7,11 @@ RUN yes | pacman --sync --refresh \
|
|||||||
ansible \
|
ansible \
|
||||||
curl \
|
curl \
|
||||||
docker \
|
docker \
|
||||||
|
docker-compose \
|
||||||
git \
|
git \
|
||||||
helm \
|
helm \
|
||||||
kubectl \
|
kubectl \
|
||||||
|
libisoburn \
|
||||||
lxd \
|
lxd \
|
||||||
make \
|
make \
|
||||||
neovim \
|
neovim \
|
||||||
|
Loading…
Reference in New Issue
Block a user