summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/usb-install.yml27
-rw-r--r--dan/ele-media.yml9
-rw-r--r--inventory/host_vars/ele-media.yml2
-rw-r--r--roles/elevate/media/tasks/main.yml24
4 files changed, 58 insertions, 4 deletions
diff --git a/common/usb-install.yml b/common/usb-install.yml
index 7469fe2d..475a4cb5 100644
--- a/common/usb-install.yml
+++ b/common/usb-install.yml
@@ -40,7 +40,7 @@
loop_control:
label: "{{ item | basename }}"
- - name: Generate syslinux configuration
+ - name: Generate syslinux configuration for BIOS boot
copy:
dest: "{{ usbdrive_path }}/syslinux.cfg"
content: |
@@ -49,7 +49,23 @@
LABEL linux
KERNEL linux
INITRD initrd.preseed.gz
- APPEND install vga=off console=ttyS0,115200n8
+ APPEND install DEBCONF_DEBUG=5
+
+ - name: create EFI boot directory
+ file:
+ path: "{{ usbdrive_path }}/EFI/boot"
+ state: directory
+
+ - name: Generate syslinux configuration for UEFI boot
+ copy:
+ dest: "{{ usbdrive_path }}/EFI/boot/syslinux.cfg"
+ content: |
+ DEFAULT linux
+ SAY SYSLINUX booting an automated installer for {{ hostname }}...
+ LABEL linux
+ KERNEL ../../linux
+ INITRD ../../initrd.preseed.gz
+ APPEND install DEBCONF_DEBUG=5
- name: Make the USB disk bootable
pause:
@@ -58,10 +74,15 @@
You should make sure the USB disk is bootable and
has syslinux installed.
- $ sudo apt install mbr syslinux
+ $ sudo apt install mbr syslinux syslinux-efi
$ sudo install-mbr /dev/CHANGEME
$ sudo syslinux -i /dev/CHANGEME1
$ sudo fdisk /dev/CHANGEME
[Here, make sure partition 1 is marked bootable.]
+ for UEFI these steps need to be done
+
+ $ cp /usr/lib/syslinux/modules/efi64/* {{ usbdrive_path }}/EFI/boot/
+ $ cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi {{ usbdrive_path }}/EFI/boot/
+
This will NOT be done automatically.
diff --git a/dan/ele-media.yml b/dan/ele-media.yml
new file mode 100644
index 00000000..bdfa287b
--- /dev/null
+++ b/dan/ele-media.yml
@@ -0,0 +1,9 @@
+---
+- name: Basic Setup
+ hosts: ele-media
+ roles:
+ - role: base
+ - role: sshd
+ - role: zsh
+ - role: admin-user
+ - role: elevate/media
diff --git a/inventory/host_vars/ele-media.yml b/inventory/host_vars/ele-media.yml
index 08cb9c39..2f3b62fc 100644
--- a/inventory/host_vars/ele-media.yml
+++ b/inventory/host_vars/ele-media.yml
@@ -3,7 +3,7 @@ network:
nameservers: "{{ network_zones.lan.dns }}"
domain: "{{ host_domain }}"
primary:
- interface: enp1s0
+ interface: eno1
ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}"
mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}"
gateway: "{{ network_zones.lan.gw }}"
diff --git a/roles/elevate/media/tasks/main.yml b/roles/elevate/media/tasks/main.yml
new file mode 100644
index 00000000..528c9246
--- /dev/null
+++ b/roles/elevate/media/tasks/main.yml
@@ -0,0 +1,24 @@
+---
+- name: create logical volume for docker
+ lvol:
+ vg: "{{ inventory_hostname }}"
+ lv: docker
+ size: 20g
+
+- name: create filesystem for docker
+ filesystem:
+ fstype: ext4
+ dev: "/dev/mapper/{{ inventory_hostname | replace('-', '--') }}-docker"
+
+- name: mount filesytem for docker
+ mount:
+ src: "/dev/mapper/{{ inventory_hostname | replace('-', '--') }}-docker"
+ path: /var/lib/docker
+ fstype: ext4
+ state: mounted
+
+- name: install needed packages
+ apt:
+ name:
+ - docker.io
+ - mdadm