Commit graph

13 commits

Author SHA1 Message Date
cdc207061b Allow for options containing commas
* instead of the boolean forcelist use force=option or force=list
2019-12-01 01:03:29 +01:00
88fcad3e29 Fix some typos 2019-12-01 01:02:21 +01:00
Simon Schuster
3ead6b2e3e README: Fix indentation for playbook-samples 2018-04-02 01:02:08 +02:00
Nick Cabatoff
22bcbb825a Add new options 'match' and 'values'. Add new op 'get'.
New set mode: set path=config match={} values={}

  Find uci sections based on path and match, modify their
  properties according to values.

  # Modify settings for pre-existing wireless interface with device radio0.
  - name: configure wireless
    uci:
      path: wireless
      match:
        device: radio0
        type: wifi-iface
      values:
        ssid: myssid
        encryption: psk2
        key: "secret passphrase"

New op: get path=config[.section] [type=t] [match=m]

  Used with register var x, outputs to x.result['values']
  (x.result.values won't work.)  This can be used for conditions
  in subsequent tasks.

  # See if there already exists a forwarding config with dest=myvpn and src=lan
  - name: Get myvpn zone forwarding
    uci: op=get path=firewall type=forwarding match="dest=myvpn src=lan"
    register: myvpnfw
  # Create the section if it doesn't exist
  - name: Add myvpn zone forwarding
    uci: autocommit=false path=firewall type=forwarding
    when: not myvpnfw.result['values']
  # Populate the section if it didn't exist
  - name: Setup myvpn zone forwarding
    uci: autocommit=false path=firewall.@forwarding[-1].{{ item.key }} value={{ item.value}}
    with_dict:
      dest: myvpn
      src: lan
    when: not myvpnfw.result['values']
2017-10-08 23:45:43 +02:00
Simon Schuster
b51a77f3ae Another typo 2016-10-03 14:51:29 +02:00
Simon Schuster
2a2c7df18d Typo fixed
thanks yushyin
2016-10-03 00:32:09 +02:00
Simon Schuster
7f6d28fef7 Fix typo 2016-09-18 14:06:09 +02:00
noctux
266f28e6f1 Fix markdown in README once more :/ 2016-09-18 13:50:34 +02:00
noctux
a8a115aea8 Fix Markdown list in README 2016-09-18 13:48:33 +02:00
Simon Schuster
94b0040d30 Hopefully fix githubs table rendering 2016-09-18 13:45:13 +02:00
Simon Schuster
4ee53658d8 Explain the name 2016-09-18 13:43:14 +02:00
Simon Schuster
e3327ad326 Mention the ansible.cfg in the README 2016-09-18 13:27:06 +02:00
Simon Schuster
c9d219ccbf README added 2016-09-18 13:19:34 +02:00