Skip to content

Commit

Permalink
Configure lugbox to deploy Void
Browse files Browse the repository at this point in the history
  • Loading branch information
the-maldridge committed Sep 28, 2016
1 parent 526e5bb commit 8fceff6
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
secret/
secret/
roles/void-deployment/files/netboot.tar.gz
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@
[submodule "roles/greeter-theme/files/lug-greeter-theme"]
path = roles/greeter-theme/files/lug-greeter-theme
url = [email protected]:utdlug/lug-greeter-theme.git
[submodule "roles/preseed-overlay"]
path = roles/preseed-overlay
url = [email protected]:SimpleGateway/preseed-overlay.git
8 changes: 6 additions & 2 deletions host_vars/lugbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ dns_SOA: 2016041301
int_if: fxp0
ext_if: bge0

boot_fname:
boot_next:
boot_fname: pxelinux.0
boot_next: 192.168.1.1

ntp:
- pool.ntp.org
Expand All @@ -24,6 +24,10 @@ staticHosts:
mac: 00:0f:b5:46:9c:c2
addr: 192.168.1.3
name: lug-cardboard
office01:
mac: c8:9c:dc:6d:20:ba
addr: 192.168.1.10
name: office01

stub-zones:
UTD:
Expand Down
6 changes: 3 additions & 3 deletions inventory
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[gateway]
lugbox
cardboard

[utility]
alexandria
[void-deployment]
lugbox

[webserver]
lug.utdallas.edu
Expand All @@ -12,4 +11,5 @@ lug.utdallas.edu
lug-idler

[workstation]
office01
lug01
1 change: 1 addition & 0 deletions roles/preseed-overlay
Submodule preseed-overlay added at 05b37c
81 changes: 81 additions & 0 deletions roles/void-deployment/files/autoinstall.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/bin/sh
# Void Linux Automatic Install Configuration

# ===
# Disk Configuration
# ===
# disk: the disk to install to
# default: the first disk that isn't the installer
#disk=/dev/hda

# bootpartitionsize: controls how large the boot partition will be
# default: 500M
#bootpartitionsize=500M

# swapsize: how large should the swap partition be
# default: equal to the installed physical memory
#swapsize=

# ===
# XBPS Configuration
# ===
# xbpsrepository: which repo should the install pull from
# default: http://repo.voidlinux.eu/current
#xbpsrepository="http://repo.voidlinux.eu/current"

# pkgs: additional packages to install into the target
# default: none
#pkgs=""

# ===
# Default User
# ===
# username: the username of the user to be created
# default: voidlinux
username="lug"

# password: password to set for the new user
# default: unset (will prompt during install)
# Warning: This does not work in musl!
password="lug"

# ===
# Misc. Options
# ===
# timezone: Timezone in TZ format
# default: America/Chicago
#timezone="America/Chicago"

# keymap: Keymap to use by default
# default: us
#keymap="us"

# locale: initial glibc locale
# default: en_US.UTF-8
#libclocale=en.US.UTF-8

# hostname: static hostname for the system
# default: derived from DNS
#hostname=VoidLinux

# end_action: what to do at the end of the install
# default: shutdown
# alternate values: reboot, script, func
#end_action=shutdown

# end_script: script to optionally run at end of install
# the user script must reside somewhere xbps-uhelper fetch
# can retrieve it from
# default: not set
#end_script=""

# end_function: a function to optionally be run at
# the end of the install.
end_function() {
printf "Linking default services"
chroot ${target} ln -s /etc/sv/dhcpcd /etc/runit/runsvdir/default/dhcpcd
chroot ${target} ln -s /etc/sv/sshd /etc/runit/runsvdir/default/sshd

printf "Installing python"
xbps-install -r ${target} -R ${xbpsrepository} -Sy python
}
3 changes: 3 additions & 0 deletions roles/void-deployment/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
dependencies:
- { role: preseed-overlay }
9 changes: 9 additions & 0 deletions roles/void-deployment/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Copy the void archive
copy: src=netboot.tar.gz dest=/srv/tftpboot/netboot.tar.gz owner=root group=wheel mode=0644

- name: Install the void archive
command: tar xvzf /srv/tftpboot/netboot.tar.gz -C /srv/tftpboot creates=/srv/tftpboot/pxelinux.0

- name: Copy the autoinstall.cfg
copy: src=autoinstall.cfg dest=/var/www/htdocs/preseed/autoinstall.cfg owner=root group=wheel mode=0644
8 changes: 8 additions & 0 deletions void-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- hosts: void-deployment
gather_facts: false
become: yes
become_method: doas
roles:
- gateway-base
- void-deployment

0 comments on commit 8fceff6

Please sign in to comment.