From dfb6861a94c0a660726c90c6aea52c600860a9f5 Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Thu, 1 Dec 2016 10:50:56 +0000 Subject: [PATCH] Native YAML (#3593) --- .../extras/univention/udm_dns_record.py | 10 +++--- .../modules/extras/univention/udm_dns_zone.py | 11 ++++--- .../modules/extras/univention/udm_group.py | 15 +++++---- .../modules/extras/univention/udm_share.py | 9 ++--- .../modules/extras/univention/udm_user.py | 33 ++++++++++--------- 5 files changed, 45 insertions(+), 33 deletions(-) diff --git a/lib/ansible/modules/extras/univention/udm_dns_record.py b/lib/ansible/modules/extras/univention/udm_dns_record.py index 37c2468da3a..538b747c919 100644 --- a/lib/ansible/modules/extras/univention/udm_dns_record.py +++ b/lib/ansible/modules/extras/univention/udm_dns_record.py @@ -81,10 +81,12 @@ options: EXAMPLES = ''' # Create a DNS record on a UCS -- udm_dns_zone: name=www - zone=example.com - type=host_record - data=['a': '192.168.1.1'] +- udm_dns_zone: + name: www + zone: example.com + type: host_record + data: + - a: 192.0.2.1 ''' diff --git a/lib/ansible/modules/extras/univention/udm_dns_zone.py b/lib/ansible/modules/extras/univention/udm_dns_zone.py index 88fbf878688..dd576f4e574 100644 --- a/lib/ansible/modules/extras/univention/udm_dns_zone.py +++ b/lib/ansible/modules/extras/univention/udm_dns_zone.py @@ -103,10 +103,13 @@ options: EXAMPLES = ''' # Create a DNS zone on a UCS -- udm_dns_zone: zone=example.com - type=forward_zone - nameserver=['ucs.example.com'] - interfaces=['192.168.1.1'] +- udm_dns_zone: + zone: example.com + type: forward_zone + nameserver: + - ucs.example.com + interfaces: + - 192.0.2.1 ''' diff --git a/lib/ansible/modules/extras/univention/udm_group.py b/lib/ansible/modules/extras/univention/udm_group.py index 588c7655241..1db030efa98 100644 --- a/lib/ansible/modules/extras/univention/udm_group.py +++ b/lib/ansible/modules/extras/univention/udm_group.py @@ -74,16 +74,19 @@ options: EXAMPLES = ''' # Create a POSIX group -- udm_group: name=g123m-1A +- udm_group: + name: g123m-1A # Create a POSIX group with the exact DN # C(cn=g123m-1A,cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com) -- udm_group: name=g123m-1A - subpath='cn=classes,cn=students,cn=groups' - ou=school +- udm_group: + name: g123m-1A + subpath: 'cn=classes,cn=students,cn=groups' + ou: school # or -- udm_group: name=g123m-1A - position='cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com' +- udm_group: + name: g123m-1A + position: 'cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com' ''' diff --git a/lib/ansible/modules/extras/univention/udm_share.py b/lib/ansible/modules/extras/univention/udm_share.py index fa8639958ea..2f7febfdd40 100644 --- a/lib/ansible/modules/extras/univention/udm_share.py +++ b/lib/ansible/modules/extras/univention/udm_share.py @@ -375,10 +375,11 @@ options: EXAMPLES = ''' # Create a share named home on the server ucs.example.com with the path /home. -- udm_share: name=home - path=/home - host=ucs.example.com - sambaName=Home +- udm_share: + name: home + path: /home + host: ucs.example.com + sambaName: Home ''' diff --git a/lib/ansible/modules/extras/univention/udm_user.py b/lib/ansible/modules/extras/univention/udm_user.py index 2eed02a2c04..ecd6e86546b 100644 --- a/lib/ansible/modules/extras/univention/udm_user.py +++ b/lib/ansible/modules/extras/univention/udm_user.py @@ -318,25 +318,28 @@ options: EXAMPLES = ''' # Create a user on a UCS -- udm_user: name=FooBar - password=secure_password - firstname=Foo - lastname=Bar +- udm_user: + name: FooBar + password: secure_password + firstname: Foo + lastname: Bar # Create a user with the DN # C(uid=foo,cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com) -- udm_user: name=foo - password=secure_password - firstname=Foo - lastname=Bar - ou=school - subpath='cn=teachers,cn=users' +- udm_user: + name: foo + password: secure_password + firstname: Foo + lastname: Bar + ou: school + subpath: 'cn=teachers,cn=users' # or define the position -- udm_user: name=foo - password=secure_password - firstname=Foo - lastname=Bar - position='cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com' +- udm_user: + name: foo + password: secure_password + firstname: Foo + lastname: Bar + position: 'cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com' '''