#!/bin/sh echo "Generating random root pasword" usermod -p "$(openssl rand -base64 24 | encrypt)" root echo "Installing SSH keys for root" cat < /root/.ssh/authorized_keys {{ ssh_keys_root | join('\n') }} EOF {% if hostvars[install_hostname].ansible_port is defined %} echo "Setting SSH port to {{ hostvars[install_hostname].ansible_port }}" sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[install_hostname].ansible_port }}/' -i /etc/ssh/sshd_config {% endif %} echo "Installing python" pkg_add -Im python%3.7 echo "Disable sndiod service on first boot" cat <> /etc/rc.firsttime rcctl disable sndiod rcctl stop sndiod EOF rm /install.site