From f82bd4edf27b750710358c58e8183dc3643e9ea6 Mon Sep 17 00:00:00 2001 From: Jannik Beyerstedt Date: Tue, 31 Dec 2019 21:32:44 +0100 Subject: [PATCH] [CODE] ddns: add option to silence all output --- README.md | 3 +++ tasks/dyndns.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a9d173..0d464c0 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ Mandatory variables: - `ddns_passphrase`: Passphrase for updating dynDNS entries - `ddns_domain`: Domain where the host's entries are created as `$hostname.$ddns_domain` +Optional variable: +- `ddns_silence`: Set to true to silence stderr too + ### Telegraf Mandatory variables: - `telegraf_server_url`: URL of the influxDB server, e.g. `https://example.com:8086` diff --git a/tasks/dyndns.yml b/tasks/dyndns.yml index 34d1bca..b213e56 100644 --- a/tasks/dyndns.yml +++ b/tasks/dyndns.yml @@ -21,4 +21,4 @@ name: "{{ ddns_domain }} dynDNS" minute: "*/5" hour: "*" - job: "/usr/local/bin/ddns-hosts.sh > /dev/null" + job: "/usr/local/bin/ddns-hosts.sh > /dev/null{% if ddns_silence is defined and ddns_silence is sameas true %} 2>&1{% endif %}"