diff options
Diffstat (limited to 'reconfigure/items/passwd.py')
-rw-r--r-- | reconfigure/items/passwd.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/reconfigure/items/passwd.py b/reconfigure/items/passwd.py index 147bc8a..6943300 100644 --- a/reconfigure/items/passwd.py +++ b/reconfigure/items/passwd.py @@ -1,3 +1,4 @@ +from reconfigure.nodes import Node, PropertyNode from reconfigure.items.bound import BoundData @@ -8,6 +9,17 @@ class PasswdData (BoundData): class UserData (BoundData): fields = ['name', 'password', 'uid', 'gid', 'comment', 'home', 'shell'] + def template(self): + return Node( + 'line', + *[ + Node('token', children=[ + PropertyNode('value', '') + ]) + for x in UserData.fields + ] + ) + PasswdData.bind_collection('users', item_class=UserData) for i in range(0, len(UserData.fields)): |