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 %}
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
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 }}
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
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
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