diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-12-26 03:35:16 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-12-26 03:35:16 +0100 |
commit | 7b2223d9eeefa92ea968836d6c65c4d96461cdf7 (patch) | |
tree | 6fa96460e5721d5cb7845aacf665cbfe6bbbb1be /roles/installer/openbsd/autoinstall/templates/install.site.j2 | |
parent | openbsd installer: generate iso with filesets (diff) |
openbsd: add site.tgz to further customize the installation
Diffstat (limited to 'roles/installer/openbsd/autoinstall/templates/install.site.j2')
-rw-r--r-- | roles/installer/openbsd/autoinstall/templates/install.site.j2 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/installer/openbsd/autoinstall/templates/install.site.j2 b/roles/installer/openbsd/autoinstall/templates/install.site.j2 new file mode 100644 index 00000000..f4f9524d --- /dev/null +++ b/roles/installer/openbsd/autoinstall/templates/install.site.j2 @@ -0,0 +1,21 @@ +#!/bin/sh + +## TODO: enable this once we know how this works +## echo "Generating random root pasword" +## openssl rand -base64 24 | passwd root + +echo "Installing SSH keys for root" +cat <<EOF > /root/.ssh/authorized_keys +{{ ssh_keys_root | join('\n') }} +EOF + +{% if hostvars[hostname].ansible_port is defined %} +echo "Setting SSH port to {{ hostvars[hostname].ansible_port }}" +sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[hostname].ansible_port }}/' -i /etc/ssh/sshd_config +{% endif %} + +echo "Installing python" +pkg_add -Im python%3.7 + + +rm /install.site |