aboutsummaryrefslogtreecommitdiffstats
path: root/uci.py
diff options
context:
space:
mode:
authorGravatar Robin Obůrka <r.oburka@gmail.com> 2016-04-08 14:55:22 +0200
committerGravatar Robin Obůrka <r.oburka@gmail.com> 2016-04-08 14:55:22 +0200
commitd56c63b44ac6d3c40826f9e09f2c71454074269b (patch)
treeaa357b1fdacf9af438d3a96958a15f7907059051 /uci.py
parentFix bug: get_uci_key need module too (diff)
downloadansible-uci-d56c63b44ac6d3c40826f9e09f2c71454074269b.tar.xz
Defaults the index to 0
Then is possible to address unique anonymous section with type only.
Diffstat (limited to 'uci.py')
-rw-r--r--uci.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/uci.py b/uci.py
index b85f207..0ad3eae 100644
--- a/uci.py
+++ b/uci.py
@@ -52,7 +52,9 @@ options:
index:
description:
- index of anonymous section
+ - defaults to 0 so the unique section is possible to access only trough its type
required: false
+ default: 0
item:
description:
- value is option/list
@@ -168,7 +170,7 @@ def main():
package = dict(aliases=["p"], required=True),
section = dict(aliases=["s"], required=False),
type = dict(required=False),
- index = dict(required=False),
+ index = dict(default="0", required=False),
item = dict(default="option", choices=["option", "list"]),
state = dict(default="present", choices=["present", "absent"]),
create = dict(default="yes", type='bool')