vbotka.freebsd_postinstall

FreeBSD Post-Install

Quality Build Status Documentation Status GitHub Tag

This is an Ansible role called vbotka.freebsd_postinstall available on galaxy.ansible.com.

It helps in configuring FreeBSD after installation, covering settings like aliases, UPS configuration with apcupsd, SSH keys, cron jobs, network settings, and much more.

For more detailed information, check the Ansible Role FreeBSD Postinstall Documentation.

The role and documentation are in active development. If you can't find information on a task, please review the source code for usage instructions. If a feature is missing, you may want to check another role called config_light or various examples.

Feel free to give feedback and report issues.

Supported Platforms

This role works with FreeBSD Supported Releases.

Requirements and Dependencies

Roles

Collections

Packages

See the dictionaries pkg_dict_* in defaults/main/pkgdict_*.yml for available packages.

Variables

Refer to defaults and examples in vars for configuration options.

Installation Method

By default, freebsd_install_method uses packages for installation, which is faster. After upgrading from ports using (portmaster -a), you can switch to using ports.

freebsd_install_method: packages
#freebsd_install_method: ports
#freebsd_use_packages: true

If you want, you can build packages using freebsd_poudriere and install them with freebsd_packages.

Use Packages

The role freebsd_ports will install packages if this option is activated.

#freebsd_install_method: packages
freebsd_install_method: ports
freebsd_use_packages: true

Workflow

  1. Change the remote user's shell to /bin/sh if needed.
ansible host -e ansible_shell_type=csh -e ansible_shell_executable=/bin/csh -a 'sudo pw usermod user -s /bin/sh'
  1. Install the roles.
ansible-galaxy role install vbotka.freebsd_postinstall
ansible-galaxy role install vbotka.ansible_lib

Also, install the required collections if needed.

ansible-galaxy collection install ansible.posix
ansible-galaxy collection install community.general
  1. Adjust the variables to fit your needs.

  2. Create a playbook.

cat freebsd-postinstall.yml
- hosts: host
  roles:
    - vbotka.freebsd_postinstall

Refer to the Best Practice Guide.

  1. Configure the system.
ansible-playbook freebsd-postinstall.yml

Ansible Linting

Use the configuration file .ansible-lint.local when running ansible-lint. Some rules may be disabled, and warnings might be ignored. Check the notes in the configuration file for details.

shell> ansible-lint -c .ansible-lint.local

Configure the Role

The playbook .configure.yml provides sections for configuring the role. Read it for specific details.

Notes

  1. devfs issues

If "/etc/rc.d/devfs rcvar" returns no variable, it may cause the module "system" to fail. To fix this, apply the provided patch.

--- devfs.orig	2019-07-13 ...
+++ devfs	2019-07-13 ...
@@ -11,6 +11,7 @@
 . /etc/rc.subr

 name="devfs"
+rcvar="devfs_load_rulesets"
 desc="Device filesystem"
 start_cmd='devfs_start'
 stop_cmd=':'

License

license

Author Information

Vladimir Botka

References

Cloud Providers

Installa
ansible-galaxy install vbotka.freebsd_postinstall
Licenza
bsd-2-clause
Download
131
Proprietario