added uci system settings
authorChristian Pointner <equinox@realraum.at>
Sun, 20 May 2018 22:55:26 +0000 (00:55 +0200)
committerChristian Pointner <equinox@realraum.at>
Sun, 20 May 2018 22:55:26 +0000 (00:55 +0200)
ansible/roles/openwrt-image/uci.j2
ansible/tuer.yml

index 78b3468..3cc480b 100644 (file)
@@ -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 %}
index 8183e5f..9f2db2a 100644 (file)
               {% 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: