reallyenglish.poudriere
ansible-role-poudriere
Set up Poudriere, a package builder for FreeBSD.
Requirements
No special requirements.
Role Variables
Variable | Description | Default |
---|---|---|
poudriere_package |
Package name for poudriere |
ports-mgmt/poudriere |
poudriere_conf |
Path to poudriere.conf |
/usr/local/etc/poudriere.conf |
poudriere_conf_d |
Path to poudriere.d directory |
/usr/local/etc/poudriere.d |
poudriere_config_default |
Default settings for poudriere_config |
See below |
poudriere_config |
Configuration overrides for poudriere_config_default |
{} |
poudriere_ports |
Configuration for ports (details below) | {} |
poudriere_jails |
Configuration for jails (details below) | {} |
poudriere_hooks |
Hooks configuration (details below) | {} |
poudriere_make_conf_files |
List of make.conf files to create (details below) | [] |
poudriere_pkg_repo_signing_key |
Private key for signing packages | "" |
poudriere_config_default
Two options are required: BASEFS
and DISTFILES_CACHE
. For more details, check poudriere.conf.sample
.
poudriere_config_default:
FREEBSD_HOST: http://ftp.freebsd.org
SVN_HOST: svn.FreeBSD.org
BASEFS: /usr/local/poudriere
RESOLV_CONF: /etc/resolv.conf
USE_TMPFS: "yes"
DISTFILES_CACHE: /usr/ports/distfiles
poudriere_ports
Key | Description | Mandatory? |
---|---|---|
method |
Method to create the ports tree | No |
branch |
Branch to check out | No |
extra_flags |
Additional flags for poudriere(8) |
No |
path |
Path to the ports tree | No |
state |
State of the ports (present or absent ) |
Yes |
poudriere_jails
Key | Description | Mandatory? |
---|---|---|
method |
Method to create the jail | Yes |
version |
FreeBSD version to use in the jail | Yes |
extra_flags |
Additional flags for poudriere(8) |
No |
state |
State of the jail (present or absent ) |
Yes |
poudriere_hooks
Key | Description |
---|---|
hook name | Content of the hook script. Check hook for possible hook names. |
poudriere_pkg_repo_signing_key
If defined, poudriere_config['PKG_REPO_SIGNING_KEY']
must point to the key file.
poudriere_make_conf_files
This is a list of dictionaries, with details below.
Key | Description | Mandatory? |
---|---|---|
name |
File name for make.conf(5) |
Yes |
state |
Create the file if present , remove if absent |
Yes |
content |
Content for the make.conf(5) |
Yes if state is present |
Dependencies
No dependencies.
Example Playbook
- hosts: localhost
roles:
- name: reallyenglish.git
- ansible-role-poudriere
vars:
poudriere_package: ports-mgmt/poudriere-devel
poudriere_make_conf_files:
- name: make.conf
state: present
content: |
LICENSES_ACCEPTED=MSPAT OSI
MAKE_JOB_NUMBERS=3
poudriere_config:
FREEBSD_HOST: http://ftp.freebsd.org
NO_ZFS: "yes"
GIT_URL: "https://github.com/reallyenglish/freebsd-ports-mini.git"
CHECK_CHANGED_OPTIONS: verbose
NOLINUX: "yes"
PKG_REPO_SIGNING_KEY: /usr/local/etc/poudriere/keys/my.key
CCACHE_DIR: /var/cache/ccache
# openssl genrsa -out my.key 2048
# openssl rsa -in my.key -out my.pub -pubout
poudriere_pkg_repo_signing_key: |
-----BEGIN RSA PRIVATE KEY-----
(your key here)
-----END RSA PRIVATE KEY-----
poudriere_ports:
mini:
method: git
branch: 20170222
state: present
vagrant:
state: present
extra_flags: -f none -F
path: /home/vagrant/freebsd-ports
poudriere_jails:
"10_3":
method: http
version: 10.3-RELEASE
state: present
poudriere_hooks:
jail: |
#!/bin/sh
echo "args=$*"
builder: |
#!/bin/sh
echo "args=$*"
License
Copyright (c) 2016 Tomoyuki Sakurai <[email protected]>
You can use, copy, modify, and share this software for any purpose, free of charge, as long as you include the copyright notice.
THE SOFTWARE IS OFFERED "AS IS," WITHOUT ANY WARRANTIES. The author is not liable for any damages that may occur from using it.
Author Information
Tomoyuki Sakurai tomoyukis@reallyenglish.com