FreeBSD Installer script with Ansible user and base packages.
WARNING: NO PASSWORDS WILL BE SET! USE IT AT YOUR OWN RISK!
Boot into mfsBSD
Don't use the mini edition, the installer will fail!
The --no-verify-peer flag is needed, ca_root_nss is not yet installed on mfsBSD.
fetch --no-verify-peer "https://raw.githubusercontent.com/sh0shin/freebsd-installer/master/freebsd-installer.sh"You should set the ANSIBLE_SSH_KEYS variable.
vi freebsd-installer.shSetup the hostname BSD_HOSTNAME variable or
hostname myfreebsdboxchmod +x freebsd-installer.sh
./freebsd-installer.shFinally reboot into your new FreeBSD system, and run Ansible afterwards.
rebootThe following packages will be installed as a base set for Ansible:
lang/python
sysutils/dmidecode
security/ca_root_nss
security/sudo
sysutils/firstboot-freebsd-update
sysutils/firstboot-pkgs
If it's a VMware virtual-machine:
emulators/open-vm-tools-nox11
This script creates the ansible user with uid/gid 1000, no password, and the ssh-key(s) specified with the ANSIBLE_SSH_KEYS variable.
The ssh-key(s) will also be deployed for the root user!
The default sudoers rule:
ansible ALL=(ALL) NOPASSWD: ALL
%ansible ALL=(ALL) NOPASSWD: ALL