u[a-s]*: normalize docs (#9338)
* u[a-s]*: normalize docs * Update plugins/modules/udm_dns_record.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/udm_dns_record.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/udm_dns_record.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/udm_dns_zone.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/ufw.py Co-authored-by: Felix Fontein <felix@fontein.de> * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>pull/9371/head
parent
b429e8a2cf
commit
2005125af4
|
@ -10,15 +10,14 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: udm_dns_record
|
module: udm_dns_record
|
||||||
author:
|
author:
|
||||||
- Tobias Rüetschi (@keachi)
|
- Tobias Rüetschi (@keachi)
|
||||||
short_description: Manage dns entries on a univention corporate server
|
short_description: Manage dns entries on a univention corporate server
|
||||||
description:
|
description:
|
||||||
- "This module allows to manage dns records on a univention corporate server (UCS).
|
- This module allows to manage dns records on a univention corporate server (UCS). It uses the Python API of the UCS to create a new object
|
||||||
It uses the python API of the UCS to create a new object or edit it."
|
or edit it.
|
||||||
requirements:
|
requirements:
|
||||||
- Univention
|
- Univention
|
||||||
- ipaddress (for O(type=ptr_record))
|
- ipaddress (for O(type=ptr_record))
|
||||||
|
@ -40,33 +39,31 @@ options:
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- "Name of the record, this is also the DNS record. E.g. www for
|
- Name of the record, this is also the DNS record. For example V(www) for www.example.com.
|
||||||
www.example.com."
|
|
||||||
- For PTR records this has to be the IP address.
|
- For PTR records this has to be the IP address.
|
||||||
zone:
|
zone:
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- Corresponding DNS zone for this record, e.g. example.com.
|
- Corresponding DNS zone for this record, for example V(example.com).
|
||||||
- For PTR records this has to be the full reverse zone (for example V(1.1.192.in-addr.arpa)).
|
- For PTR records this has to be the full reverse zone (for example V(1.1.192.in-addr.arpa)).
|
||||||
type:
|
type:
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- "Define the record type. V(host_record) is a A or AAAA record,
|
- Define the record type. V(host_record) is a A or AAAA record, V(alias) is a CNAME, V(ptr_record) is a PTR record, V(srv_record) is a SRV
|
||||||
V(alias) is a CNAME, V(ptr_record) is a PTR record, V(srv_record)
|
record and V(txt_record) is a TXT record.
|
||||||
is a SRV record and V(txt_record) is a TXT record."
|
- 'The available choices are: V(host_record), V(alias), V(ptr_record), V(srv_record), V(txt_record).'
|
||||||
- "The available choices are: V(host_record), V(alias), V(ptr_record), V(srv_record), V(txt_record)."
|
|
||||||
data:
|
data:
|
||||||
type: dict
|
type: dict
|
||||||
default: {}
|
default: {}
|
||||||
description:
|
description:
|
||||||
- "Additional data for this record, for example V({'a': '192.0.2.1'})."
|
- "Additional data for this record, for example V({'a': '192.0.2.1'})."
|
||||||
- Required if O(state=present).
|
- Required if O(state=present).
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Create a DNS record on a UCS
|
- name: Create a DNS record on a UCS
|
||||||
community.general.udm_dns_record:
|
community.general.udm_dns_record:
|
||||||
name: www
|
name: www
|
||||||
|
@ -92,10 +89,10 @@ EXAMPLES = '''
|
||||||
type: ptr_record
|
type: ptr_record
|
||||||
data:
|
data:
|
||||||
ptr_record: "www.example.com."
|
ptr_record: "www.example.com."
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
RETURN = '''#'''
|
RETURN = """#"""
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
|
@ -10,15 +10,14 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: udm_dns_zone
|
module: udm_dns_zone
|
||||||
author:
|
author:
|
||||||
- Tobias Rüetschi (@keachi)
|
- Tobias Rüetschi (@keachi)
|
||||||
short_description: Manage dns zones on a univention corporate server
|
short_description: Manage dns zones on a univention corporate server
|
||||||
description:
|
description:
|
||||||
- "This module allows to manage dns zones on a univention corporate server (UCS).
|
- This module allows to manage dns zones on a univention corporate server (UCS). It uses the Python API of the UCS to create a new object or
|
||||||
It uses the python API of the UCS to create a new object or edit it."
|
edit it.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -32,13 +31,13 @@ options:
|
||||||
default: "present"
|
default: "present"
|
||||||
choices: [present, absent]
|
choices: [present, absent]
|
||||||
description:
|
description:
|
||||||
- Whether the dns zone is present or not.
|
- Whether the DNS zone is present or not.
|
||||||
type:
|
type:
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- Define if the zone is a forward or reverse DNS zone.
|
- Define if the zone is a forward or reverse DNS zone.
|
||||||
- "The available choices are: V(forward_zone), V(reverse_zone)."
|
- 'The available choices are: V(forward_zone), V(reverse_zone).'
|
||||||
zone:
|
zone:
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
|
@ -56,9 +55,7 @@ options:
|
||||||
elements: str
|
elements: str
|
||||||
default: []
|
default: []
|
||||||
description:
|
description:
|
||||||
- List of interface IP addresses, on which the server should
|
- List of interface IP addresses, on which the server should response this zone. Required if O(state=present).
|
||||||
response this zone. Required if O(state=present).
|
|
||||||
|
|
||||||
refresh:
|
refresh:
|
||||||
type: int
|
type: int
|
||||||
default: 3600
|
default: 3600
|
||||||
|
@ -79,7 +76,6 @@ options:
|
||||||
default: 600
|
default: 600
|
||||||
description:
|
description:
|
||||||
- Minimum TTL field that should be exported with any RR from this zone.
|
- Minimum TTL field that should be exported with any RR from this zone.
|
||||||
|
|
||||||
contact:
|
contact:
|
||||||
type: str
|
type: str
|
||||||
default: ''
|
default: ''
|
||||||
|
@ -91,10 +87,10 @@ options:
|
||||||
default: []
|
default: []
|
||||||
description:
|
description:
|
||||||
- List of MX servers. (Must declared as A or AAAA records).
|
- List of MX servers. (Must declared as A or AAAA records).
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Create a DNS zone on a UCS
|
- name: Create a DNS zone on a UCS
|
||||||
community.general.udm_dns_zone:
|
community.general.udm_dns_zone:
|
||||||
zone: example.com
|
zone: example.com
|
||||||
|
@ -103,10 +99,10 @@ EXAMPLES = '''
|
||||||
- ucs.example.com
|
- ucs.example.com
|
||||||
interfaces:
|
interfaces:
|
||||||
- 192.0.2.1
|
- 192.0.2.1
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = """# """
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.univention_umc import (
|
from ansible_collections.community.general.plugins.module_utils.univention_umc import (
|
||||||
|
|
|
@ -10,15 +10,14 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: udm_group
|
module: udm_group
|
||||||
author:
|
author:
|
||||||
- Tobias Rüetschi (@keachi)
|
- Tobias Rüetschi (@keachi)
|
||||||
short_description: Manage of the posix group
|
short_description: Manage of the posix group
|
||||||
description:
|
description:
|
||||||
- "This module allows to manage user groups on a univention corporate server (UCS).
|
- This module allows to manage user groups on a univention corporate server (UCS). It uses the Python API of the UCS to create a new object
|
||||||
It uses the python API of the UCS to create a new object or edit it."
|
or edit it.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -37,7 +36,7 @@ options:
|
||||||
name:
|
name:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- Name of the posix group.
|
- Name of the POSIX group.
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
required: false
|
required: false
|
||||||
|
@ -47,26 +46,25 @@ options:
|
||||||
position:
|
position:
|
||||||
required: false
|
required: false
|
||||||
description:
|
description:
|
||||||
- define the whole ldap position of the group, e.g.
|
- Define the whole LDAP position of the group, for example V(cn=g123m-1A,cn=classes,cn=schueler,cn=groups,ou=schule,dc=example,dc=com).
|
||||||
C(cn=g123m-1A,cn=classes,cn=schueler,cn=groups,ou=schule,dc=example,dc=com).
|
|
||||||
type: str
|
type: str
|
||||||
default: ''
|
default: ''
|
||||||
ou:
|
ou:
|
||||||
required: false
|
required: false
|
||||||
description:
|
description:
|
||||||
- LDAP OU, e.g. school for LDAP OU C(ou=school,dc=example,dc=com).
|
- LDAP OU, for example V(school) for LDAP OU V(ou=school,dc=example,dc=com).
|
||||||
type: str
|
type: str
|
||||||
default: ''
|
default: ''
|
||||||
subpath:
|
subpath:
|
||||||
required: false
|
required: false
|
||||||
description:
|
description:
|
||||||
- Subpath inside the OU, e.g. C(cn=classes,cn=students,cn=groups).
|
- Subpath inside the OU, for example V(cn=classes,cn=students,cn=groups).
|
||||||
type: str
|
type: str
|
||||||
default: "cn=groups"
|
default: "cn=groups"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Create a POSIX group
|
- name: Create a POSIX group
|
||||||
community.general.udm_group:
|
community.general.udm_group:
|
||||||
name: g123m-1A
|
name: g123m-1A
|
||||||
|
@ -84,10 +82,10 @@ EXAMPLES = '''
|
||||||
community.general.udm_group:
|
community.general.udm_group:
|
||||||
name: g123m-1A
|
name: g123m-1A
|
||||||
position: 'cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com'
|
position: 'cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com'
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = """# """
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.univention_umc import (
|
from ansible_collections.community.general.plugins.module_utils.univention_umc import (
|
||||||
|
|
|
@ -10,16 +10,14 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: udm_share
|
module: udm_share
|
||||||
author:
|
author:
|
||||||
- Tobias Rüetschi (@keachi)
|
- Tobias Rüetschi (@keachi)
|
||||||
short_description: Manage samba shares on a univention corporate server
|
short_description: Manage samba shares on a univention corporate server
|
||||||
description:
|
description:
|
||||||
- "This module allows to manage samba shares on a univention corporate
|
- This module allows to manage samba shares on a univention corporate server (UCS). It uses the Python API of the UCS to create a new object
|
||||||
server (UCS).
|
or edit it.
|
||||||
It uses the python API of the UCS to create a new object or edit it."
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -37,7 +35,7 @@ options:
|
||||||
name:
|
name:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- Name
|
- Name.
|
||||||
type: str
|
type: str
|
||||||
host:
|
host:
|
||||||
required: false
|
required: false
|
||||||
|
@ -329,20 +327,20 @@ options:
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
aliases: [nfs_custom_settings]
|
aliases: [nfs_custom_settings]
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Create a share named home on the server ucs.example.com with the path /home
|
- name: Create a share named home on the server ucs.example.com with the path /home
|
||||||
community.general.udm_share:
|
community.general.udm_share:
|
||||||
name: home
|
name: home
|
||||||
path: /home
|
path: /home
|
||||||
host: ucs.example.com
|
host: ucs.example.com
|
||||||
sambaName: Home
|
sambaName: Home
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = """# """
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.univention_umc import (
|
from ansible_collections.community.general.plugins.module_utils.univention_umc import (
|
||||||
|
|
|
@ -10,20 +10,17 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: udm_user
|
module: udm_user
|
||||||
author:
|
author:
|
||||||
- Tobias Rüetschi (@keachi)
|
- Tobias Rüetschi (@keachi)
|
||||||
short_description: Manage posix users on a univention corporate server
|
short_description: Manage posix users on a univention corporate server
|
||||||
description:
|
description:
|
||||||
- "This module allows to manage posix users on a univention corporate
|
- This module allows to manage posix users on a univention corporate server (UCS). It uses the Python API of the UCS to create a new object
|
||||||
server (UCS).
|
or edit it.
|
||||||
It uses the python API of the UCS to create a new object or edit it."
|
|
||||||
notes:
|
notes:
|
||||||
- This module requires the deprecated L(crypt Python module,
|
- This module requires the deprecated L(crypt Python module, https://docs.python.org/3.12/library/crypt.html) library which was removed from
|
||||||
https://docs.python.org/3.12/library/crypt.html) library which was removed from Python 3.13.
|
Python 3.13. For Python 3.13 or newer, you need to install L(legacycrypt, https://pypi.org/project/legacycrypt/).
|
||||||
For Python 3.13 or newer, you need to install L(legacycrypt, https://pypi.org/project/legacycrypt/).
|
|
||||||
requirements:
|
requirements:
|
||||||
- legacycrypt (on Python 3.13 or newer)
|
- legacycrypt (on Python 3.13 or newer)
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -43,7 +40,7 @@ options:
|
||||||
username:
|
username:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- User name
|
- User name.
|
||||||
aliases: ['name']
|
aliases: ['name']
|
||||||
type: str
|
type: str
|
||||||
firstname:
|
firstname:
|
||||||
|
@ -60,7 +57,7 @@ options:
|
||||||
type: str
|
type: str
|
||||||
birthday:
|
birthday:
|
||||||
description:
|
description:
|
||||||
- Birthday
|
- Birthday.
|
||||||
type: str
|
type: str
|
||||||
city:
|
city:
|
||||||
description:
|
description:
|
||||||
|
@ -77,11 +74,11 @@ options:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
description:
|
description:
|
||||||
- Description (not gecos)
|
- Description (not gecos).
|
||||||
type: str
|
type: str
|
||||||
display_name:
|
display_name:
|
||||||
description:
|
description:
|
||||||
- Display name (not gecos)
|
- Display name (not gecos).
|
||||||
aliases: [displayName]
|
aliases: [displayName]
|
||||||
type: str
|
type: str
|
||||||
email:
|
email:
|
||||||
|
@ -92,30 +89,27 @@ options:
|
||||||
elements: str
|
elements: str
|
||||||
employee_number:
|
employee_number:
|
||||||
description:
|
description:
|
||||||
- Employee number
|
- Employee number.
|
||||||
aliases: [employeeNumber]
|
aliases: [employeeNumber]
|
||||||
type: str
|
type: str
|
||||||
employee_type:
|
employee_type:
|
||||||
description:
|
description:
|
||||||
- Employee type
|
- Employee type.
|
||||||
aliases: [employeeType]
|
aliases: [employeeType]
|
||||||
type: str
|
type: str
|
||||||
gecos:
|
gecos:
|
||||||
description:
|
description:
|
||||||
- GECOS
|
- GECOS.
|
||||||
type: str
|
type: str
|
||||||
groups:
|
groups:
|
||||||
default: []
|
default: []
|
||||||
description:
|
description:
|
||||||
- "POSIX groups, the LDAP DNs of the groups will be found with the
|
- 'POSIX groups, the LDAP DNs of the groups will be found with the LDAP filter for each group as $GROUP: V((&(objectClass=posixGroup\)(cn=$GROUP\)\)).'
|
||||||
LDAP filter for each group as $GROUP:
|
|
||||||
V((&(objectClass=posixGroup\\)(cn=$GROUP\\)\\))."
|
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
home_share:
|
home_share:
|
||||||
description:
|
description:
|
||||||
- "Home NFS share. Must be a LDAP DN, e.g.
|
- Home NFS share. Must be a LDAP DN, for example V(cn=home,cn=shares,ou=school,dc=example,dc=com).
|
||||||
V(cn=home,cn=shares,ou=school,dc=example,dc=com)."
|
|
||||||
aliases: [homeShare]
|
aliases: [homeShare]
|
||||||
type: str
|
type: str
|
||||||
home_share_path:
|
home_share_path:
|
||||||
|
@ -143,37 +137,37 @@ options:
|
||||||
elements: str
|
elements: str
|
||||||
mail_home_server:
|
mail_home_server:
|
||||||
description:
|
description:
|
||||||
- FQDN of mail server
|
- FQDN of mail server.
|
||||||
aliases: [mailHomeServer]
|
aliases: [mailHomeServer]
|
||||||
type: str
|
type: str
|
||||||
mail_primary_address:
|
mail_primary_address:
|
||||||
description:
|
description:
|
||||||
- Primary e-mail address
|
- Primary e-mail address.
|
||||||
aliases: [mailPrimaryAddress]
|
aliases: [mailPrimaryAddress]
|
||||||
type: str
|
type: str
|
||||||
mobile_telephone_number:
|
mobile_telephone_number:
|
||||||
default: []
|
default: []
|
||||||
description:
|
description:
|
||||||
- Mobile phone number
|
- Mobile phone number.
|
||||||
aliases: [mobileTelephoneNumber]
|
aliases: [mobileTelephoneNumber]
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
organisation:
|
organisation:
|
||||||
description:
|
description:
|
||||||
- Organisation
|
- Organisation.
|
||||||
aliases: [organization]
|
aliases: [organization]
|
||||||
type: str
|
type: str
|
||||||
overridePWHistory:
|
overridePWHistory:
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
description:
|
description:
|
||||||
- Override password history
|
- Override password history.
|
||||||
aliases: [override_pw_history]
|
aliases: [override_pw_history]
|
||||||
overridePWLength:
|
overridePWLength:
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
description:
|
description:
|
||||||
- Override password check
|
- Override password check.
|
||||||
aliases: [override_pw_length]
|
aliases: [override_pw_length]
|
||||||
pager_telephonenumber:
|
pager_telephonenumber:
|
||||||
default: []
|
default: []
|
||||||
|
@ -200,7 +194,7 @@ options:
|
||||||
type: str
|
type: str
|
||||||
profilepath:
|
profilepath:
|
||||||
description:
|
description:
|
||||||
- Windows profile directory
|
- Windows profile directory.
|
||||||
type: str
|
type: str
|
||||||
pwd_change_next_login:
|
pwd_change_next_login:
|
||||||
choices: ['0', '1']
|
choices: ['0', '1']
|
||||||
|
@ -215,8 +209,7 @@ options:
|
||||||
type: str
|
type: str
|
||||||
samba_privileges:
|
samba_privileges:
|
||||||
description:
|
description:
|
||||||
- "Samba privilege, like allow printer administration, do domain
|
- Samba privilege, like allow printer administration, do domain join.
|
||||||
join."
|
|
||||||
aliases: [sambaPrivileges]
|
aliases: [sambaPrivileges]
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
|
@ -251,7 +244,7 @@ options:
|
||||||
shell:
|
shell:
|
||||||
default: '/bin/bash'
|
default: '/bin/bash'
|
||||||
description:
|
description:
|
||||||
- Login shell
|
- Login shell.
|
||||||
type: str
|
type: str
|
||||||
street:
|
street:
|
||||||
description:
|
description:
|
||||||
|
@ -263,7 +256,7 @@ options:
|
||||||
type: str
|
type: str
|
||||||
unixhome:
|
unixhome:
|
||||||
description:
|
description:
|
||||||
- Unix home directory
|
- Unix home directory.
|
||||||
- If not specified, it defaults to C(/home/$USERNAME).
|
- If not specified, it defaults to C(/home/$USERNAME).
|
||||||
type: str
|
type: str
|
||||||
userexpiry:
|
userexpiry:
|
||||||
|
@ -274,33 +267,28 @@ options:
|
||||||
position:
|
position:
|
||||||
default: ''
|
default: ''
|
||||||
description:
|
description:
|
||||||
- "Define the whole position of users object inside the LDAP tree,
|
- Define the whole position of users object inside the LDAP tree, for example V(cn=employee,cn=users,ou=school,dc=example,dc=com).
|
||||||
for example V(cn=employee,cn=users,ou=school,dc=example,dc=com)."
|
|
||||||
type: str
|
type: str
|
||||||
update_password:
|
update_password:
|
||||||
default: always
|
default: always
|
||||||
choices: [always, on_create]
|
choices: [always, on_create]
|
||||||
description:
|
description:
|
||||||
- "V(always) will update passwords if they differ.
|
- V(always) will update passwords if they differ. V(on_create) will only set the password for newly created users.
|
||||||
V(on_create) will only set the password for newly created users."
|
|
||||||
type: str
|
type: str
|
||||||
ou:
|
ou:
|
||||||
default: ''
|
default: ''
|
||||||
description:
|
description:
|
||||||
- "Organizational Unit inside the LDAP Base DN, for example V(school) for
|
- Organizational Unit inside the LDAP Base DN, for example V(school) for LDAP OU C(ou=school,dc=example,dc=com).
|
||||||
LDAP OU C(ou=school,dc=example,dc=com)."
|
|
||||||
type: str
|
type: str
|
||||||
subpath:
|
subpath:
|
||||||
default: 'cn=users'
|
default: 'cn=users'
|
||||||
description:
|
description:
|
||||||
- "LDAP subpath inside the organizational unit, for example
|
- LDAP subpath inside the organizational unit, for example V(cn=teachers,cn=users) for LDAP container C(cn=teachers,cn=users,dc=example,dc=com).
|
||||||
V(cn=teachers,cn=users) for LDAP container
|
|
||||||
C(cn=teachers,cn=users,dc=example,dc=com)."
|
|
||||||
type: str
|
type: str
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Create a user on a UCS
|
- name: Create a user on a UCS
|
||||||
community.general.udm_user:
|
community.general.udm_user:
|
||||||
name: FooBar
|
name: FooBar
|
||||||
|
@ -325,10 +313,10 @@ EXAMPLES = '''
|
||||||
firstname: Foo
|
firstname: Foo
|
||||||
lastname: Bar
|
lastname: Bar
|
||||||
position: 'cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com'
|
position: 'cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com'
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = """# """
|
||||||
|
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
import traceback
|
import traceback
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: ufw
|
module: ufw
|
||||||
short_description: Manage firewall with UFW
|
short_description: Manage firewall with UFW
|
||||||
description:
|
description:
|
||||||
|
@ -23,10 +22,9 @@ author:
|
||||||
- Ahti Kitsik (@ahtik)
|
- Ahti Kitsik (@ahtik)
|
||||||
notes:
|
notes:
|
||||||
- See C(man ufw) for more examples.
|
- See C(man ufw) for more examples.
|
||||||
- >
|
- "B(Warning:) Whilst the module itself can be run using concurrent strategies, C(ufw) does not support concurrency, as firewall rules are meant
|
||||||
B(Warning:) Whilst the module itself can be run using concurrent strategies, C(ufw) does not support concurrency,
|
to be ordered and parallel executions do not guarantee order. B(Do not use concurrency:) The results are unpredictable and the module may
|
||||||
as firewall rules are meant to be ordered and parallel executions do not guarantee order.
|
fail silently if you do."
|
||||||
B(Do not use concurrency:) The results are unpredictable and the module may fail silently if you do.
|
|
||||||
requirements:
|
requirements:
|
||||||
- C(ufw) package
|
- C(ufw) package
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -53,8 +51,7 @@ options:
|
||||||
aliases: [policy]
|
aliases: [policy]
|
||||||
direction:
|
direction:
|
||||||
description:
|
description:
|
||||||
- Select direction for a rule or default policy command. Mutually
|
- Select direction for a rule or default policy command. Mutually exclusive with O(interface_in) and O(interface_out).
|
||||||
exclusive with O(interface_in) and O(interface_out).
|
|
||||||
type: str
|
type: str
|
||||||
choices: [in, incoming, out, outgoing, routed]
|
choices: [in, incoming, out, outgoing, routed]
|
||||||
logging:
|
logging:
|
||||||
|
@ -66,37 +63,31 @@ options:
|
||||||
description:
|
description:
|
||||||
- Insert the corresponding rule as rule number NUM.
|
- Insert the corresponding rule as rule number NUM.
|
||||||
- Note that ufw numbers rules starting with 1.
|
- Note that ufw numbers rules starting with 1.
|
||||||
- If O(delete=true) and a value is provided for O(insert),
|
- If O(delete=true) and a value is provided for O(insert), then O(insert) is ignored.
|
||||||
then O(insert) is ignored.
|
|
||||||
type: int
|
type: int
|
||||||
insert_relative_to:
|
insert_relative_to:
|
||||||
description:
|
description:
|
||||||
- Allows to interpret the index in O(insert) relative to a position.
|
- Allows to interpret the index in O(insert) relative to a position.
|
||||||
- V(zero) interprets the rule number as an absolute index (i.e. 1 is
|
- V(zero) interprets the rule number as an absolute index (that is, 1 is the first rule).
|
||||||
the first rule).
|
- V(first-ipv4) interprets the rule number relative to the index of the first IPv4 rule, or relative to the position where the first IPv4
|
||||||
- V(first-ipv4) interprets the rule number relative to the index of the
|
rule would be if there is currently none.
|
||||||
first IPv4 rule, or relative to the position where the first IPv4 rule
|
- V(last-ipv4) interprets the rule number relative to the index of the last IPv4 rule, or relative to the position where the last IPv4 rule
|
||||||
would be if there is currently none.
|
would be if there is currently none.
|
||||||
- V(last-ipv4) interprets the rule number relative to the index of the
|
- V(first-ipv6) interprets the rule number relative to the index of the first IPv6 rule, or relative to the position where the first IPv6
|
||||||
last IPv4 rule, or relative to the position where the last IPv4 rule
|
rule would be if there is currently none.
|
||||||
would be if there is currently none.
|
- V(last-ipv6) interprets the rule number relative to the index of the last IPv6 rule, or relative to the position where the last IPv6 rule
|
||||||
- V(first-ipv6) interprets the rule number relative to the index of the
|
|
||||||
first IPv6 rule, or relative to the position where the first IPv6 rule
|
|
||||||
would be if there is currently none.
|
|
||||||
- V(last-ipv6) interprets the rule number relative to the index of the
|
|
||||||
last IPv6 rule, or relative to the position where the last IPv6 rule
|
|
||||||
would be if there is currently none.
|
would be if there is currently none.
|
||||||
type: str
|
type: str
|
||||||
choices: [first-ipv4, first-ipv6, last-ipv4, last-ipv6, zero]
|
choices: [first-ipv4, first-ipv6, last-ipv4, last-ipv6, zero]
|
||||||
default: zero
|
default: zero
|
||||||
rule:
|
rule:
|
||||||
description:
|
description:
|
||||||
- Add firewall rule
|
- Add firewall rule.
|
||||||
type: str
|
type: str
|
||||||
choices: [allow, deny, limit, reject]
|
choices: [allow, deny, limit, reject]
|
||||||
log:
|
log:
|
||||||
description:
|
description:
|
||||||
- Log new connections matched to this rule
|
- Log new connections matched to this rule.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
from_ip:
|
from_ip:
|
||||||
|
@ -134,32 +125,27 @@ options:
|
||||||
delete:
|
delete:
|
||||||
description:
|
description:
|
||||||
- Delete rule.
|
- Delete rule.
|
||||||
- If O(delete=true) and a value is provided for O(insert),
|
- If O(delete=true) and a value is provided for O(insert), then O(insert) is ignored.
|
||||||
then O(insert) is ignored.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
interface:
|
interface:
|
||||||
description:
|
description:
|
||||||
- Specify interface for the rule. The direction (in or out) used
|
- Specify interface for the rule. The direction (in or out) used for the interface depends on the value of O(direction). See O(interface_in)
|
||||||
for the interface depends on the value of O(direction). See
|
and O(interface_out) for routed rules that needs to supply both an input and output interface. Mutually exclusive with O(interface_in)
|
||||||
O(interface_in) and O(interface_out) for routed rules that needs
|
and O(interface_out).
|
||||||
to supply both an input and output interface. Mutually
|
|
||||||
exclusive with O(interface_in) and O(interface_out).
|
|
||||||
type: str
|
type: str
|
||||||
aliases: [if]
|
aliases: [if]
|
||||||
interface_in:
|
interface_in:
|
||||||
description:
|
description:
|
||||||
- Specify input interface for the rule. This is mutually
|
- Specify input interface for the rule. This is mutually exclusive with O(direction) and O(interface). However, it is compatible with O(interface_out)
|
||||||
exclusive with O(direction) and O(interface). However, it is
|
for routed rules.
|
||||||
compatible with O(interface_out) for routed rules.
|
|
||||||
type: str
|
type: str
|
||||||
aliases: [if_in]
|
aliases: [if_in]
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
interface_out:
|
interface_out:
|
||||||
description:
|
description:
|
||||||
- Specify output interface for the rule. This is mutually
|
- Specify output interface for the rule. This is mutually exclusive with O(direction) and O(interface). However, it is compatible with O(interface_in)
|
||||||
exclusive with O(direction) and O(interface). However, it is
|
for routed rules.
|
||||||
compatible with O(interface_in) for routed rules.
|
|
||||||
type: str
|
type: str
|
||||||
aliases: [if_out]
|
aliases: [if_out]
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
|
@ -172,9 +158,9 @@ options:
|
||||||
description:
|
description:
|
||||||
- Add a comment to the rule. Requires UFW version >=0.35.
|
- Add a comment to the rule. Requires UFW version >=0.35.
|
||||||
type: str
|
type: str
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Allow everything and enable UFW
|
- name: Allow everything and enable UFW
|
||||||
community.general.ufw:
|
community.general.ufw:
|
||||||
state: enabled
|
state: enabled
|
||||||
|
@ -299,7 +285,7 @@ EXAMPLES = r'''
|
||||||
route: true
|
route: true
|
||||||
src: 192.0.2.0/24
|
src: 192.0.2.0/24
|
||||||
dest: 198.51.100.0/24
|
dest: 198.51.100.0/24
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,11 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: uptimerobot
|
module: uptimerobot
|
||||||
short_description: Pause and start Uptime Robot monitoring
|
short_description: Pause and start Uptime Robot monitoring
|
||||||
description:
|
description:
|
||||||
- This module will let you start and pause Uptime Robot Monitoring
|
- This module will let you start and pause Uptime Robot Monitoring.
|
||||||
author: "Nate Kingsley (@nate-kingsley)"
|
author: "Nate Kingsley (@nate-kingsley)"
|
||||||
requirements:
|
requirements:
|
||||||
- Valid Uptime Robot API Key
|
- Valid Uptime Robot API Key
|
||||||
|
@ -43,9 +42,9 @@ options:
|
||||||
required: true
|
required: true
|
||||||
notes:
|
notes:
|
||||||
- Support for adding and removing monitors and alert contacts has not yet been implemented.
|
- Support for adding and removing monitors and alert contacts has not yet been implemented.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Pause the monitor with an ID of 12345
|
- name: Pause the monitor with an ID of 12345
|
||||||
community.general.uptimerobot:
|
community.general.uptimerobot:
|
||||||
monitorid: 12345
|
monitorid: 12345
|
||||||
|
@ -57,7 +56,7 @@ EXAMPLES = '''
|
||||||
monitorid: 12345
|
monitorid: 12345
|
||||||
apikey: 12345-1234512345
|
apikey: 12345-1234512345
|
||||||
state: started
|
state: started
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,11 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: urpmi
|
module: urpmi
|
||||||
short_description: Urpmi manager
|
short_description: Urpmi manager
|
||||||
description:
|
description:
|
||||||
- Manages packages with C(urpmi) (such as for Mageia or Mandriva)
|
- Manages packages with C(urpmi) (such as for Mageia or Mandriva).
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -50,21 +49,19 @@ options:
|
||||||
default: true
|
default: true
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
- Assume "yes" is the answer to any question urpmi has to ask.
|
- Assume "yes" is the answer to any question urpmi has to ask. Corresponds to the C(--force) option for C(urpmi).
|
||||||
Corresponds to the C(--force) option for C(urpmi).
|
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
root:
|
root:
|
||||||
description:
|
description:
|
||||||
- Specifies an alternative install root, relative to which all packages will be installed.
|
- Specifies an alternative install root, relative to which all packages will be installed. Corresponds to the C(--root) option for C(urpmi).
|
||||||
Corresponds to the C(--root) option for C(urpmi).
|
|
||||||
aliases: [installroot]
|
aliases: [installroot]
|
||||||
type: str
|
type: str
|
||||||
author:
|
author:
|
||||||
- Philippe Makowski (@pmakowski)
|
- Philippe Makowski (@pmakowski)
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Install package foo
|
- name: Install package foo
|
||||||
community.general.urpmi:
|
community.general.urpmi:
|
||||||
pkg: foo
|
pkg: foo
|
||||||
|
@ -85,7 +82,7 @@ EXAMPLES = '''
|
||||||
name: bar
|
name: bar
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
|
@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: usb_facts
|
module: usb_facts
|
||||||
short_description: Allows listing information about USB devices
|
short_description: Allows listing information about USB devices
|
||||||
version_added: 8.5.0
|
version_added: 8.5.0
|
||||||
|
@ -25,9 +24,9 @@ extends_documentation_fragment:
|
||||||
- community.general.attributes.facts_module
|
- community.general.attributes.facts_module
|
||||||
requirements:
|
requirements:
|
||||||
- lsusb binary on PATH (usually installed through the package usbutils and preinstalled on many systems)
|
- lsusb binary on PATH (usually installed through the package usbutils and preinstalled on many systems)
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Get information about USB devices
|
- name: Get information about USB devices
|
||||||
community.general.usb_facts:
|
community.general.usb_facts:
|
||||||
|
|
||||||
|
@ -35,9 +34,9 @@ EXAMPLES = '''
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "On bus {{ item.bus }} device {{ item.device }} with id {{ item.id }} is {{ item.name }}"
|
msg: "On bus {{ item.bus }} device {{ item.device }} with id {{ item.id }} is {{ item.name }}"
|
||||||
loop: "{{ ansible_facts.usb_devices }}"
|
loop: "{{ ansible_facts.usb_devices }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
ansible_facts:
|
ansible_facts:
|
||||||
description: Dictionary containing details of connected USB devices.
|
description: Dictionary containing details of connected USB devices.
|
||||||
returned: always
|
returned: always
|
||||||
|
@ -69,7 +68,7 @@ ansible_facts:
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: Linux Foundation 2.0 root hub
|
sample: Linux Foundation 2.0 root hub
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
Loading…
Reference in New Issue