rpm_key: PEP8 compliancy and documentation changes (#33426)
This PR includes: - PEP8 compliancy changes - Documentation changespull/4420/head
parent
fbfeeff6bf
commit
ff50b7893c
|
@ -2,48 +2,42 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Ansible module to import third party repo keys to your rpm db
|
# Ansible module to import third party repo keys to your rpm db
|
||||||
# (c) 2013, Héctor Acosta <hector.acosta@gazzang.com>
|
# Copyright: (c) 2013, Héctor Acosta <hector.acosta@gazzang.com>
|
||||||
#
|
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
'supported_by': 'core'}
|
'supported_by': 'core'}
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: rpm_key
|
module: rpm_key
|
||||||
author: "Hector Acosta (@hacosta) <hector.acosta@gazzang.com>"
|
author:
|
||||||
|
- Hector Acosta (@hacosta) <hector.acosta@gazzang.com>
|
||||||
short_description: Adds or removes a gpg key from the rpm db
|
short_description: Adds or removes a gpg key from the rpm db
|
||||||
description:
|
description:
|
||||||
- Adds or removes (rpm --import) a gpg key to your rpm database.
|
- Adds or removes (rpm --import) a gpg key to your rpm database.
|
||||||
version_added: "1.3"
|
version_added: "1.3"
|
||||||
options:
|
options:
|
||||||
key:
|
key:
|
||||||
required: true
|
|
||||||
default: null
|
|
||||||
aliases: []
|
|
||||||
description:
|
description:
|
||||||
- Key that will be modified. Can be a url, a file, or a keyid if the key already exists in the database.
|
- Key that will be modified. Can be a url, a file, or a keyid if the key already exists in the database.
|
||||||
|
required: true
|
||||||
state:
|
state:
|
||||||
required: false
|
|
||||||
default: "present"
|
|
||||||
choices: [present, absent]
|
|
||||||
description:
|
description:
|
||||||
- If the key will be imported or removed from the rpm db.
|
- If the key will be imported or removed from the rpm db.
|
||||||
|
default: present
|
||||||
|
choices: [ absent, present ]
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If C(no) and the C(key) is a url starting with https, SSL certificates will not be validated. This should only be used
|
- If C(no) and the C(key) is a url starting with https, SSL certificates will not be validated. This should only be used
|
||||||
on personally controlled sites using self-signed certificates.
|
on personally controlled sites using self-signed certificates.
|
||||||
required: false
|
type: bool
|
||||||
default: 'yes'
|
default: 'yes'
|
||||||
choices: ['yes', 'no']
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
@ -193,11 +187,11 @@ class RpmKey(object):
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
state=dict(default='present', choices=['present', 'absent'], type='str'),
|
state=dict(type='str', default='present', choices=['absent', 'present']),
|
||||||
key=dict(required=True, type='str'),
|
key=dict(type='str', required=True),
|
||||||
validate_certs=dict(default='yes', type='bool'),
|
validate_certs=dict(type='bool', default=True),
|
||||||
),
|
),
|
||||||
supports_check_mode=True
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
RpmKey(module)
|
RpmKey(module)
|
||||||
|
|
|
@ -270,7 +270,6 @@ lib/ansible/modules/packaging/os/pkgng.py
|
||||||
lib/ansible/modules/packaging/os/pkgutil.py
|
lib/ansible/modules/packaging/os/pkgutil.py
|
||||||
lib/ansible/modules/packaging/os/portage.py
|
lib/ansible/modules/packaging/os/portage.py
|
||||||
lib/ansible/modules/packaging/os/portinstall.py
|
lib/ansible/modules/packaging/os/portinstall.py
|
||||||
lib/ansible/modules/packaging/os/rpm_key.py
|
|
||||||
lib/ansible/modules/packaging/os/sorcery.py
|
lib/ansible/modules/packaging/os/sorcery.py
|
||||||
lib/ansible/modules/packaging/os/svr4pkg.py
|
lib/ansible/modules/packaging/os/svr4pkg.py
|
||||||
lib/ansible/modules/packaging/os/swdepot.py
|
lib/ansible/modules/packaging/os/swdepot.py
|
||||||
|
|
Loading…
Reference in New Issue