From: Christian Pointner Date: Sun, 20 May 2018 22:55:26 +0000 (+0200) Subject: added uci system settings X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=eb0b0492bb573d9fdbfad93116f47a6276263eb1;p=noc.git added uci system settings --- diff --git a/ansible/roles/openwrt-image/uci.j2 b/ansible/roles/openwrt-image/uci.j2 index 78b3468..3cc480b 100644 --- a/ansible/roles/openwrt-image/uci.j2 +++ b/ansible/roles/openwrt-image/uci.j2 @@ -3,7 +3,13 @@ {% for section in item.value %} config {{ section.name }} {% for option, value in section.options.items() %} +{% if value is iterable and value is not string %} +{% for v in value %} + list {{ option }} '{{ v }}' +{% endfor %} +{% else %} option {{ option }} '{{ value }}' +{% endif %} {% endfor %} {% endfor %} diff --git a/ansible/tuer.yml b/ansible/tuer.yml index 8183e5f..9f2db2a 100644 --- a/ansible/tuer.yml +++ b/ansible/tuer.yml @@ -119,6 +119,25 @@ {% endfor %} openwrt_uci: + system: + - name: system + options: + hostname: '{{ inventory_hostname }}' + timezone: 'CET-1CEST,M3.5.0,M10.5.0/3' + ttylogin: '0' + log_size: '64' + urandom_seed: '0' + + - name: timeserver 'ntp' + options: + enabled: '1' + enable_server: '0' + server: + - '0.lede.pool.ntp.org' + - '1.lede.pool.ntp.org' + - '2.lede.pool.ntp.org' + - '3.lede.pool.ntp.org' + network: - name: globals 'globals' options: