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