๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-playbooks/roles/strongswan/templates/init_exporter.j2

20 lines
654 B

2 years ago
#!/sbin/openrc-run
name="$SVCNAME"
directory="{{ strongswan_exporter_dir }}"
command="{{ strongswan_exporter_dir }}/ipsec_exporter"
command_args="{{ [] | zip_longest(strongswan_exporter_cfg.keys() | list, fillvalue='--') |
map('join') | list |
zip(strongswan_exporter_cfg.values() | list | map('quote')) |
map('join', ' ') |
join(' ') }}"
command_user="{{ strongswan_user }}:{{ strongswan_group }}"
pidfile="/var/run/$SVCNAME.pid"
command_background=true
start_stop_daemon_args="--stdout-logger logger --stderr-logger logger"
depend() {
need net
use dns
}