validate-modules: Fix all system modules (#52384)

This PR includes validate-modules fixes for all system modules.
Except a few that are deliberately implemented like this.
This commit is contained in:
Dag Wieers 2019-02-19 15:42:14 +01:00 committed by GitHub
commit 8c74df5e67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 568 additions and 495 deletions

View file

@ -1,4 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Dan Keder <dan.keder@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@ -10,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: seport
short_description: Manages SELinux network port type definitions
@ -20,33 +21,37 @@ version_added: "2.0"
options:
ports:
description:
- Ports or port ranges. Can be a list (since 2.6) or comma separated string.
- Ports or port ranges.
- Can be a list (since 2.6) or comma separated string.
type: list
required: true
proto:
description:
- Protocol for the specified port.
type: str
required: true
choices: [ tcp, udp ]
setype:
description:
- SELinux type for the specified port.
type: str
required: true
state:
description:
- Desired boolean value.
required: true
type: str
choices: [ absent, present ]
default: present
reload:
description:
- Reload SELinux policy after commit.
type: bool
default: 'yes'
default: yes
ignore_selinux_state:
description:
- Run independent of selinux runtime state
type: bool
default: false
default: no
version_added: '2.8'
notes:
- The changes are persistent across reboots.
@ -58,7 +63,7 @@ author:
- Dan Keder (@dankeder)
'''
EXAMPLES = '''
EXAMPLES = r'''
- name: Allow Apache to listen on tcp port 8888
seport:
ports: 8888
@ -258,7 +263,7 @@ def main():
ports=dict(type='list', required=True),
proto=dict(type='str', required=True, choices=['tcp', 'udp']),
setype=dict(type='str', required=True),
state=dict(type='str', required=True, choices=['absent', 'present']),
state=dict(type='str', default='present', choices=['absent', 'present']),
reload=dict(type='bool', default=True),
),
supports_check_mode=True,