Templates
apcupsd.conf.j2
Synopsis: Template apcupsd.conf.
Description of the template.
1## apcupsd.conf v1.1 ##
2# {{ ansible_managed }}
3UPSNAME {{ fp_apcupsd_upsname }}
4UPSCABLE {{ fp_apcupsd_upscable }}
5UPSTYPE {{ fp_apcupsd_upstype }}
6LOCKFILE {{ fp_apcupsd_lockfile }}
7SCRIPTDIR {{ fp_apcupsd_scriptdir }}
8PWRFAILDIR {{ fp_apcupsd_pwrfaildir }}
9NOLOGINDIR {{ fp_apcupsd_nologindir }}
10ONBATTERYDELAY {{ fp_apcupsd_onbatterydelay }}
11BATTERYLEVEL {{ fp_apcupsd_batterylevel }}
12MINUTES {{ fp_apcupsd_minutes }}
13TIMEOUT {{ fp_apcupsd_timeout }}
14ANNOY {{ fp_apcupsd_annoy }}
15ANNOYDELAY {{ fp_apcupsd_annoydelay }}
16NOLOGON {{ fp_apcupsd_nologon }}
17KILLDELAY {{ fp_apcupsd_killdelay }}
18NETSERVER {{ fp_apcupsd_netserver }}
19NISIP {{ fp_apcupsd_nisip }}
20NISPORT {{ fp_apcupsd_nisport }}
21EVENTSFILE {{ fp_apcupsd_eventsfile }}
22EVENTSFILEMAX {{ fp_apcupsd_eventsfilemax }}
23UPSCLASS {{ fp_apcupsd_upsclass }}
24UPSMODE {{ fp_apcupsd_upsmode }}
25STATTIME {{ fp_apcupsd_stattime }}
26STATFILE {{ fp_apcupsd_statfile }}
27LOGSTATS {{ fp_apcupsd_logstats }}
exports.j2
Synopsis: Template exports.
Description of the template.
1# {{ ansible_managed }}
2{% for item in fp_nfsd_exports %}
3{{ item.mount_point }} {{ item.flags }}
4{% endfor %}
freebsd-update.conf.j2
Synopsis: Template freebsd-update.conf.
Description of the template.
[templates/freebsd-update.conf.j2]
1# {{ ansible_managed }}
2# $FreeBSD$
3
4# Trusted keyprint. Changing this is a Bad Idea unless you've received
5# a PGP-signed email from <security-officer@FreeBSD.org> telling you to
6# change it and explaining why.
7KeyPrint {{ fp_freebsd_update_KeyPrint }}
8
9# Server or server pool from which to fetch updates. You can change
10# this to point at a specific server if you want, but in most cases
11# using a "nearby" server won't provide a measurable improvement in
12# performance.
13ServerName {{ fp_freebsd_update_ServerName }}
14
15# Components of the base system which should be kept updated.
16Components {{ fp_freebsd_update_Components | join(' ') }}
17
18# Example for updating the userland and the kernel source code only:
19# Components src/base src/sys world
20
21# Paths which start with anything matching an entry in an IgnorePaths
22# statement will be ignored.
23{% if fp_freebsd_update_IgnorePaths|length > 0 %}
24IgnorePaths {{ fp_freebsd_update_IgnorePaths }}
25{% else %}
26IgnorePaths
27{% endif %}
28
29# Paths which start with anything matching an entry in an IDSIgnorePaths
30# statement will be ignored by "freebsd-update IDS".
31{% for item in fp_freebsd_update_IDSIgnorePaths %}
32IDSIgnorePaths {{ item }}
33{% endfor %}
34
35# Paths which start with anything matching an entry in an UpdateIfUnmodified
36# statement will only be updated if the contents of the file have not been
37# modified by the user (unless changes are merged; see below).
38UpdateIfUnmodified {{ fp_freebsd_update_UpdateIfUnmodified | join(' ') }}
39
40# When upgrading to a new FreeBSD release, files which match MergeChanges
41# will have any local changes merged into the version from the new release.
42MergeChanges {{ fp_freebsd_update_MergeChanges | join(' ') }}
43
44### Default configuration options:
45
46# Directory in which to store downloaded updates and temporary
47# files used by FreeBSD Update.
48# WorkDir /var/db/freebsd-update
49{% if fp_freebsd_update_WorkDir is defined %}
50WorkDir {{ fp_freebsd_update_WorkDir }}
51{% endif %}
52
53# Destination to send output of "freebsd-update cron" if an error
54# occurs or updates have been downloaded.
55# MailTo root
56{% if fp_freebsd_update_MailTo is defined %}
57MailTo {{ fp_freebsd_update_MailTo }}
58{% endif %}
59
60# Is FreeBSD Update allowed to create new files?
61# AllowAdd yes
62{% if fp_freebsd_update_AllowAdd is defined %}
63AllowAdd {{ fp_freebsd_update_AllowAdd }}
64{% endif %}
65
66# Is FreeBSD Update allowed to delete files?
67# AllowDelete yes
68{% if fp_freebsd_update_AllowDelete is defined %}
69AllowDelete {{ fp_freebsd_update_AllowDelete }}
70{% endif %}
71
72# If the user has modified file ownership, permissions, or flags, should
73# FreeBSD Update retain this modified metadata when installing a new version
74# of that file?
75# KeepModifiedMetadata yes
76{% if fp_freebsd_update_KeepModifiedMetadata is defined %}
77KeepModifiedMetadata {{ fp_freebsd_update_KeepModifiedMetadata }}
78{% endif %}
79
80# When upgrading between releases, should the list of Components be
81# read strictly (StrictComponents yes) or merely as a list of components
82# which *might* be installed of which FreeBSD Update should figure out
83# which actually are installed and upgrade those (StrictComponents no)?
84# StrictComponents no
85{% if fp_freebsd_update_StrictComponents is defined %}
86StrictComponents {{ fp_freebsd_update_StrictComponents }}
87{% endif %}
88
89# When installing a new kernel perform a backup of the old one first
90# so it is possible to boot the old kernel in case of problems.
91# BackupKernel yes
92{% if fp_freebsd_update_BackupKernel is defined %}
93BackupKernel {{ fp_freebsd_update_BackupKernel }}
94{% endif %}
95
96# If BackupKernel is enabled, the backup kernel is saved to this
97# directory.
98# BackupKernelDir /boot/kernel.old
99{% if fp_freebsd_update_BackupKernelDir is defined %}
100BackupKernelDir {{ fp_freebsd_update_BackupKernelDir }}
101{% endif %}
102
103# When backing up a kernel also back up debug symbol files?
104# BackupKernelSymbolFiles no
105{% if fp_freebsd_update_BackupKernelSymbolFiles is defined %}
106BackupKernelSymbolFiles {{ fp_freebsd_update_BackupKernelSymbolFiles }}
107{% endif %}
108
109# Create a new boot environment when installing patches
110# CreateBootEnv yes
111{% if fp_freebsd_update_CreateBootEnv is defined %}
112CreateBootEnv {{ fp_freebsd_update_CreateBootEnv }}
113{% endif %}
groupadd.j2
Synopsis: Template groupadd.
Description of the template.
1#!/usr/local/bin/bash
2exec {{ fp_group_add }} "$@"
groupdel.j2
Synopsis: Template groupdel.
Description of the template.
1#!/usr/local/bin/bash
2exec {{ fp_group_del }} "$@"
groupmod.j2
Synopsis: Template groupmod.
Description of the template.
1#!/usr/local/bin/bash
2exec {{ fp_group_mod }} "$@"
hostapd.conf.j2
Synopsis: Template hostapd.conf.
Description of the template.
1# {{ ansible_managed }}
2ssid={{ fp_hostapd_ssid }}
3interface={{ fp_hostapd_interface }}
4driver={{ fp_hostapd_driver }}
5ctrl_interface={{ fp_hostapd_ctrl_interface }}
6ctrl_interface_group={{ fp_hostapd_ctrl_interface_group }}
7hw_mode={{ fp_hostapd_hw_mode }}
8channel={{ fp_hostapd_channel }}
9beacon_int={{ fp_hostapd_beacon_int }}
10dtim_period={{ fp_hostapd_dtim_period }}
11max_num_sta={{ fp_hostapd_max_num_sta }}
12rts_threshold={{ fp_hostapd_rts_threshold }}
13fragm_threshold={{ fp_hostapd_fragm_threshold }}
14auth_algs={{ fp_hostapd_auth_algs }}
15ignore_broadcast_ssid={{ fp_hostapd_ignore_broadcast_ssid }}
16#
17wpa={{ fp_hostapd_wpa }}
18wpa_pairwise={{ fp_hostapd_wpa_pairwise }}
19wpa_key_mgmt={{ fp_hostapd_wpa_key_mgmt }}
20wpa_passphrase={{ fp_hostapd_wpa_passphrase }}
21#
22logger_syslog={{ fp_hostapd_logger_syslog }}
23logger_syslog_level={{ fp_hostapd_logger_syslog_level }}
24logger_stdout={{ fp_hostapd_logger_stdout }}
25logger_stdout_level={{ fp_hostapd_logger_stdout_level }}
26#
27##### Integrated EAP server
28eap_server={{ fp_hostapd_eap_server }}
29#eap_user_file=/etc/hostapd.eap_user
30#ca_cert=/etc/hostapd.ca.pem
31#server_cert=/etc/hostapd.server.pem
32#private_key=/etc/hostapd.server.prv
33#private_key_passwd=secret passphrase
34#check_crl=1
35#dh_file=/etc/hostapd.dh.pem
36#eap_sim_db=unix:/tmp/hlr_auc_gw.sock
37#pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f
38#eap_fast_a_id=test server
39#tnc=1
hosts.j2
Synopsis: Template hosts.
Description of the template.
1# {{ ansible_managed }}
2{{ fp_hosts_localhost_ipv6 }} localhost localhost.{{ fp_domain }}
3{{ fp_hosts_localhost_ipv4 }} localhost localhost.{{ fp_domain }}
4
5{% for item in fp_hosts_conf %}
6{{ item.ip }} {{ item.fqdn }} {{ item.hostname|default('') }}
7{% endfor %}
8
9# EOF
hosts-aliases-list.j2
Synopsis: Template hosts-aliases-list.
Description of the template.
[templates/hosts-aliases-list.j2]
1# {{ ansible_managed }}
2{{ fp_hosts_localhost_ipv6 }} localhost localhost.{{ fp_domain }}
3{{ fp_hosts_localhost_ipv4 }} localhost localhost.{{ fp_domain }}
4
5{% for item in fp_hosts_conf %}
6{{ item.ip }} {{ item.fqdn }}{% for alias in item.aliases|default([]) %} {{ alias }}{% endfor %}{% if item.hostname|default('')|length > 0 %} {{ item.hostname }}
7{% endif %}
8{% endfor %}
9
10# EOF
hosts.allow-01.j2
Synopsis: Template hosts.allow-01.
Description of the template.
1# {{ ansible_managed }}
2{% for item in fp_inetd_hosts_allow_conf %}
3{% set v=item.values()|list %}
4{% if v|length == 2 %}
5{{ v[0]|join(' ') }} : {{ v[1]|join(' ') }}
6{% else %}
7{{ v[0]|join(' ') }} : {{ v[1]|join(' ') }} \
8{% for vi in v[2:-1] %}
9 : {{ vi|join(' ') }} \
10{% endfor %}
11 : {{ v[-1]|join(' ') }}
12{% endif %}
13{% endfor %}
hosts.allow-02.j2
Synopsis: Template hosts.allow-02.
Description of the template.
1# {{ ansible_managed }}
2{% for item in fp_inetd_hosts_allow_conf %}
3{{ item.daemons | join(' ') }} : \
4 {{ item.clients | join(' ') }} : \
5{% if item.options is defined %}
6 {{ item.options | join(' ') }} : \
7{% endif %}
8 {{ item.action | join(' ') }}
9{% endfor %}
loader.conf.j2
Synopsis: Template loader.conf.
Description of the template.
1# {{ ansible_managed }}
2
3# fp_loader_conf
4{% for item in fp_loader_conf %}
5{{ item }}
6{% endfor %}
7{% for item in fp_sysctl_loader_conf %}
8{{ item }}
9{% endfor %}
10
11# fp_loader_conf_modules
12{% for item in fp_loader_conf_modules %}
13{{ item }}_load="YES"
14{% endfor %}
15
16# EOF
login.conf.j2
Synopsis: Template login.conf.
Description of the template.
1# {{ ansible_managed }}
2
3# system classes
4{% for item in fp_login_conf %}
5{{ item.class }}:\
6{% for citem in item.conf|flatten %}
7{{ '\t' }}:{{ citem }}:{% if not loop.last %}\{% endif %}
8
9{% endfor %}
10{% endfor %}
11
12# extra classes
13{% for item in fp_login_conf_extra %}
14{{ item.class }}:\
15{% for citem in item.conf|flatten %}
16{{ '\t' }}:{{ citem }}:{% if not loop.last %}\{% endif %}
17
18{% endfor %}
19{% endfor %}
20
21# EOF
login_conf.j2
Synopsis: Template login_conf.
Description of the template.
1# {{ ansible_managed }}
2
3{{ item.class }}:\
4{% for citem in item.conf|flatten %}
5{{ '\t' }}:{{ citem }}:{% if not loop.last %}\{% endif %}
6
7{% endfor %}
8
9# EOF
make.conf.j2
Synopsis: Template make.conf.
Description of the template.
1# {{ ansible_managed }}
2{% for item in fp_make_conf %}
3{{ item }}
4{% endfor %}
motd.j2
Synopsis: Template motd.
Description of the template.
1{{ fp_motd_message }}
newsyslog.conf.j2
Synopsis: Template newsyslog.conf.
Description of the template.
1# {{ ansible_managed }}
2{% set separator=' ' %}
3{% for k,v in fp_syslogd_newconf.items() %}
4{% if k == 'include' %}
5
6{% for i in v %}
7<include> {{ i }}
8{% endfor %}
9{% else %}
10{{ k }} {{ v|join(separator) }}
11{% endif %}
12{% endfor %}
ntp.conf.j2
Synopsis: Template ntp.conf.
Description of the template.
1# {{ ansible_managed }}
2{% if fp_ntp_config_tinker_panic_enabled %}
3tinker panic 0
4{% endif %}
5{% if fp_ntp_config_driftfile %}
6driftfile {{ fp_ntp_config_driftfile }}
7{% endif %}
8{% for option in fp_ntp_config_options %}
9{{ option }}
10{% endfor %}
11{% for pool in fp_ntp_config_pool %}
12pool {{ pool }}
13{% endfor %}
14{% for server in fp_ntp_config_server %}
15server {{ server }}
16{% endfor %}
17{% for peer in fp_ntp_config_peer %}
18peer {{ peer }}
19{% endfor %}
20{% if fp_ntp_config_statistics %}
21statistics {{ fp_ntp_config_statistics }}
22{% endif %}
23{% for filegen in fp_ntp_config_filegen %}
24filegen {{ filegen }}
25{% endfor %}
26{% for listen in fp_ntp_config_listen %}
27interface listen {{ listen }}
28{% endfor %}
29{% for restrict in fp_ntp_config_restrict %}
30restrict {{ restrict }}
31{% endfor %}
32{% if fp_ntp_config_crypto %}
33crypto
34{% endif %}
35{% if fp_ntp_config_includefile %}
36includefile {{ fp_ntp_config_includefile }}
37{% endif %}
38{% if fp_ntp_config_keys %}
39keys {{ fp_ntp_config_keys }}
40{% endif %}
41{% if fp_ntp_config_trustedkey %}
42trustedkey {{ fp_ntp_config_trustedkey }}
43{% endif %}
44{% if fp_ntp_config_requestkey %}
45requestkey {{ fp_ntp_config_requestkey }}
46{% endif %}
47{% if fp_ntp_config_controlkey %}
48controlkey {{ fp_ntp_config_controlkey }}
49{% endif %}
50{% if fp_ntp_config_broadcast %}
51broadcast {{ fp_ntp_config_broadcast }}
52{% endif %}
53{% if fp_ntp_config_broadcastclient %}
54broadcastclient
55{% endif %}
56{% if fp_ntp_config_multicastclient %}
57multicastclient {{ fp_ntp_config_multicastclient }}
58{% endif %}
59{% if fp_ntp_config_leapfile %}
60leapfile {{ fp_ntp_config_leapfile }}
61{% endif %}
procmailrc-includerc-capability.j2
Synopsis: Template procmailrc-includerc-capability.
Description of the template.
[templates/procmailrc-includerc-capability.j2]
1# Subject: capability; Capability: Send list of capabilities
2:0i
3* !^Subject:.*Re:
4* !^FROM_DAEMON
5* ^Subject:.*capability
6| (/usr/local/bin/formail -r -A "From: {{ item.par1 }}"; \
7 grep -h -r "^# Subject.*Capability" {{ item.par2 }}/*.rc ) \
8 | $SENDMAIL -oi -t
procmailrc-includerc-duplicates.j2
Synopsis: Template procmailrc-includerc-duplicates.
Description of the template.
[templates/procmailrc-includerc-duplicates.j2]
1# get's rid of duplicates
2:0 Wh: msgid.lock
3| formail -D 8192 msgid.cache
procmailrc-includerc-get-certificate.j2
Synopsis: Template procmailrc-includerc-get-certificate.
Description of the template.
[templates/procmailrc-includerc-get-certificate.j2]
1# Subject: get certificate; Capability: Send fingerprint of certifcate
2:0i
3* !^Subject:.*Re:
4* !^FROM_DAEMON
5* ^Subject:.*get certificate
6| (/usr/local/bin/formail -r -A "From: {{ item.par1 }}"; {{ item.par2 }}) | $SENDMAIL -oi -t
procmailrc-includerc-get-fingerprint.j2
Synopsis: Template procmailrc-includerc-get-fingerprint.
Description of the template.
[templates/procmailrc-includerc-get-fingerprint.j2]
1# Subject: get fingerprint; Capability: Send fingerprint of /etc/ssh/ssh_host_ecdsa_key.pub
2:0i
3* !^Subject:.*Re:
4* !^FROM_DAEMON
5* ^Subject:.*get fingerprint
6| (/usr/local/bin/formail -r -A "From: {{ item.par1 }}"; \
7 ssh-keygen -l -f {{ item.par2 }}; \
8 ssh-keygen -l -E MD5 -f {{ item.par2 }}) \
9 | $SENDMAIL -oi -t
procmailrc-includerc-get-fingerprints.j2
Synopsis: Template procmailrc-includerc-get-fingerprints.
Description of the template.
[templates/procmailrc-includerc-get-fingerprints.j2]
1# Subject: get fingerprints; Capability: Send fingerprints of /etc/ssh/*.pub
2:0i
3* !^Subject:.*Re:
4* !^FROM_DAEMON
5* ^Subject:.*get fingerprints
6| (/usr/local/bin/formail -r -A "From: {{ item.par1 }}"; \
7 for i in /etc/ssh/*.pub; \
8 do printf "$i\n"; \
9 ssh-keygen -l -f $i; \
10 ssh-keygen -l -E MD5 -f $i; \
11 printf "\n"; done) \
12 | $SENDMAIL -oi -t
procmailrc-includerc-get-message.j2
Synopsis: Template procmailrc-includerc-get-message.
Description of the template.
[templates/procmailrc-includerc-get-message.j2]
1# Subject: get message; Capability: Send content of {{ item.par2 }}
2#
3# https://www.freebsd.org/cgi/man.cgi?query=procmailex
4# If someone sends you a mail with the word `retrieve' in the
5# subject, the following will automatically send back the contents
6# of info_file to the sender. Like in all recipes where we send
7# mail, we watch out for mail loops.
8#
9# :0
10# * !^From +YOUR_USERNAME
11# * !^Subject:.*Re:
12# * !^FROM_DAEMON
13# * ^Subject:.*retrieve
14# | (formail -r ; cat info_file) | $SENDMAIL -oi -t
15#
16
17:0i
18* !^Subject:.*Re:
19* !^FROM_DAEMON
20* ^Subject:.*get message
21| (/usr/local/bin/formail -r -A "From: {{ item.par1 }}"; cat {{ item.par2 }} ) | $SENDMAIL -oi -t
procmailrc.j2
Synopsis: Template procmailrc.
Description of the template.
1# {{ ansible_managed }}
2{% for line in config %}
3{{ line }}
4{% endfor %}
ssh_config.j2
Synopsis: Template ssh_config.
Description of the template.
1# {{ ansible_managed }}
2{% for item in fp_ssh_conf %}
3Host {{ item.host }}
4{% for conf in item.conf %}
5 {{ conf.key }} {{ conf.val }}
6{% endfor %}
7{% endfor %}
8
9# EOF
syslog.conf.j2
Synopsis: Template syslog.conf.
Description of the template.
1# {{ ansible_managed }}
2{% for k,v in fp_syslogd_conf.items() %}
3{% if v is mapping %}
4{{ k }}
5{% for l,f in v.items() %}
6{{ f|join(';') }} {{ l }}
7{% endfor %}
8{% else %}
9{{ v|join(';') }} {{ k }}
10{% endif %}
11{% endfor %}
wpa_supplicant.conf.j2
Synopsis: Template wpa_supplicant.conf.
Description of the template.
[templates/wpa_supplicant.conf.j2]
1# {{ ansible_managed }}
2{% for gvar in fp_wpasupplicant_conf_global %}
3{{ gvar.key }}={{ gvar.value }}
4{% endfor %}
5{% for net in item.network %}
6{% for nvar in net.conf %}
7{% if loop.first %}
8
9network={
10{% endif %}
11 {{ nvar.key }}={{ nvar.value }}
12{% if loop.last %}
13}
14{% endif %}
15{% endfor %}
16{% endfor %}
17
18# EOF