This repository provides an Ansible collection for performing actions against OpenBSD hosts.

If you are looking for a hosting provider that offers OpenBSD, consider using OpenBSD.Amsterdam which contributes to The OpenBSD Foundation.


# Install the collection
ansible-galaxy collection install jcmdln.openbsd

# Adhoc use of a module
ansible -i $INVENTORY all -m jcmdln.openbsd.pkg -a "name=htop state=present"

# Use a provided playbook to ensure Python is installed
ansible-playbook -i $INVENTORY jcmdln.openbsd.python

# Chain playbooks to update packages and patch hosts
ansible-playbook -i $INVENTORY jcmdln.openbsd.{pkg,syspatch}


To avoid reinstalling the collection during each change, create a symbolic link to your user’s collections path instead of installing the collection:

mkdir -pv $HOME/.ansible/collections/ansible_collections/jcmdln &&
rm -frv $HOME/.ansible/collections/ansible_collections/jcmdln/openbsd &&
ln -fs $PWD $HOME/.ansible/collections/ansible_collections/jcmdln/openbsd