upated
This commit is contained in:
parent
80353518f2
commit
b4a71873b8
2
defaults/main.yml
Normal file
2
defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
debianunattended_debian_version: 12.2.0
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: check if iso exists
|
- name: check if iso exists
|
||||||
stat:
|
stat:
|
||||||
path: "{{ playbook_dir }}/debian-12.1.0-amd64-netinst-unattended-{{ inventory_hostname }}.iso"
|
path: "{{ playbook_dir }}/debian-{{ debianunattended_debian_version }}-amd64-netinst-unattended-{{ inventory_hostname }}.iso"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
register: iso_exists
|
register: iso_exists
|
||||||
|
|
||||||
@ -14,7 +14,7 @@
|
|||||||
name:
|
name:
|
||||||
- xorriso
|
- xorriso
|
||||||
- unzip
|
- unzip
|
||||||
- genisoimage
|
- cdrkit
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
@ -26,8 +26,8 @@
|
|||||||
|
|
||||||
- name: Download ISO Image
|
- name: Download ISO Image
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.1.0-amd64-netinst.iso"
|
url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-{{ debianunattended_debian_version }}-amd64-netinst.iso"
|
||||||
dest: "/opt/ansiblepackages/debianunattended/debian-12.1.0-amd64-netinst.iso"
|
dest: "/opt/ansiblepackages/debianunattended/debian-{{ debianunattended_debian_version }}-amd64-netinst.iso"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: delete old stuff
|
- name: delete old stuff
|
||||||
@ -37,7 +37,7 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: extract ISO Image
|
- name: extract ISO Image
|
||||||
command: "xorriso -osirrox on -indev /opt/ansiblepackages/debianunattended/debian-12.1.0-amd64-netinst.iso -extract / /opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/"
|
command: "xorriso -osirrox on -indev /opt/ansiblepackages/debianunattended/debian-{{ debianunattended_debian_version }}-amd64-netinst.iso -extract / /opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/"
|
||||||
args:
|
args:
|
||||||
creates: "/opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/install.amd/initrd.gz"
|
creates: "/opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/install.amd/initrd.gz"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
@ -101,7 +101,7 @@
|
|||||||
|
|
||||||
- name: copy authorized_keys file
|
- name: copy authorized_keys file
|
||||||
copy:
|
copy:
|
||||||
src: files/authorized_keys
|
src: files/ssh-keys.pub
|
||||||
dest: "/opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/authorized_keys"
|
dest: "/opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/authorized_keys"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
@ -147,5 +147,5 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: genisoimage
|
- name: genisoimage
|
||||||
command: "genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o {{ playbook_dir }}/debian-12.1.0-amd64-netinst-unattended-{{ inventory_hostname }}.iso /opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles"
|
command: "genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o {{ playbook_dir }}/debian-{{ debianunattended_debian_version }}-amd64-netinst-unattended-{{ inventory_hostname }}.iso /opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
Loading…
Reference in New Issue
Block a user