Code Monkey home page Code Monkey logo

ansible-freebsd-postinstall's Introduction

freebsd_postinstall

qualityBuild StatusDocumentation Status

Ansible role

FreeBSD post-install configuration: aliases, apcupsd, authorized keys, cron, devfs, dhclient, freebsd-update, fstab, groups, hostapd, hostname, hosts, inetd, libmap, linux compatibility, login.conf, loader.conf, make.conf, motd, nfsd, ntpd, ntpdate, procmail, qemu, resolvconf.conf, smartd, snmpd, sudoers, ssh, sshd, swap, sysctl, syslog, timezone, tmpmfs, users, packages and ports, periodic.conf, overlays, wpa_supplicant, (wip) ...

Documentation at readthedocs.io

This role and the documentation is work in progress. If the documentation of a task is missing it's necessary to review the source code to learn how to use it. If a functionality is missing consider role config_light. See various examples. If config_light is not able to do what you want create new tasks.

Feel free to share your feedback and report issues.

Contributions are welcome.

Supported platforms

This role has been developed and tested with FreeBSD Supported Releases.

Requirements and dependencies

Roles

Collections

Packages

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

Variables

Review defaults and examples in vars.

freebsd_install_method

By default freebsd_install_method is set to install packages. Installation is faster. But, later, after having upgraded from the ports (portmaster -a) switch the method to ports.

freebsd_install_method: packages
#freebsd_install_method: ports
#freebsd_use_packages: true

Optionally the packages can be built by freebsd_poudriere and installed by freebsd_packages

freebsd_use_packages

Role freebsd_ports will install packages if this option is set.

#freebsd_install_method: packages
freebsd_install_method: ports
freebsd_use_packages: true

Workflow

  1. On the remote hosts, change shell to /bin/sh for the remote user if necessary
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

and install the collections if necessary

ansible-galaxy collection install ansible.posix
ansible-galaxy collection install community.general
  1. Fit variables, for example in vars
editor vbotka.freebsd_postinstall/vars/main.yml
  1. Create playbook
cat freebsd-postinstall.yml
- hosts: host
  roles:
    - vbotka.freebsd_postinstall

See the Best practice.

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

Notes

  1. devfs

"/etc/rc.d/devfs rcvar" returns no variable. As a result module "system" fails

fatal: [srv.example.com]: FAILED! => changed=false
  msg: unable to determine rcvar

To solve this problem apply the path below

--- devfs.orig	2019-07-13 20:31:04.688022000 +0200
+++ devfs	2019-07-13 20:34:49.347159000 +0200
@@ -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

ansible-freebsd-postinstall's People

Contributors

vbotka avatar em-winterschon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.