ma*.py: normalize docs (#9389)
* ma*.py: normalize docs * Update plugins/modules/matrix.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>pull/8676/merge
parent
a99f72fc36
commit
a9fca56374
|
@ -12,13 +12,12 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: macports
|
module: macports
|
||||||
author: "Jimmy Tang (@jcftang)"
|
author: "Jimmy Tang (@jcftang)"
|
||||||
short_description: Package manager for MacPorts
|
short_description: Package manager for MacPorts
|
||||||
description:
|
description:
|
||||||
- Manages MacPorts packages (ports)
|
- Manages MacPorts packages (ports).
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -55,11 +54,12 @@ options:
|
||||||
variant:
|
variant:
|
||||||
description:
|
description:
|
||||||
- A port variant specification.
|
- A port variant specification.
|
||||||
- 'O(variant) is only supported with O(state=installed) and O(state=present).'
|
- O(variant) is only supported with O(state=installed) and O(state=present).
|
||||||
aliases: ['variants']
|
aliases: ['variants']
|
||||||
type: str
|
type: str
|
||||||
'''
|
"""
|
||||||
EXAMPLES = '''
|
|
||||||
|
EXAMPLES = r"""
|
||||||
- name: Install the foo port
|
- name: Install the foo port
|
||||||
community.general.macports:
|
community.general.macports:
|
||||||
name: foo
|
name: foo
|
||||||
|
@ -101,7 +101,7 @@ EXAMPLES = '''
|
||||||
community.general.macports:
|
community.general.macports:
|
||||||
name: foo
|
name: foo
|
||||||
state: inactive
|
state: inactive
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
|
@ -9,25 +9,19 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
author:
|
author:
|
||||||
- Dag Wieers (@dagwieers)
|
- Dag Wieers (@dagwieers)
|
||||||
module: mail
|
module: mail
|
||||||
short_description: Send an email
|
short_description: Send an email
|
||||||
description:
|
description:
|
||||||
- This module is useful for sending emails from playbooks.
|
- This module is useful for sending emails from playbooks.
|
||||||
- One may wonder why automate sending emails? In complex environments
|
- One may wonder why automate sending emails? In complex environments there are from time to time processes that cannot be automated, either
|
||||||
there are from time to time processes that cannot be automated, either
|
because you lack the authority to make it so, or because not everyone agrees to a common approach.
|
||||||
because you lack the authority to make it so, or because not everyone
|
- If you cannot automate a specific step, but the step is non-blocking, sending out an email to the responsible party to make them perform their
|
||||||
agrees to a common approach.
|
part of the bargain is an elegant way to put the responsibility in someone else's lap.
|
||||||
- If you cannot automate a specific step, but the step is non-blocking,
|
- Of course sending out a mail can be equally useful as a way to notify one or more people in a team that a specific action has been (successfully)
|
||||||
sending out an email to the responsible party to make them perform their
|
taken.
|
||||||
part of the bargain is an elegant way to put the responsibility in
|
|
||||||
someone else's lap.
|
|
||||||
- Of course sending out a mail can be equally useful as a way to notify
|
|
||||||
one or more people in a team that a specific action has been
|
|
||||||
(successfully) taken.
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -90,7 +84,7 @@ options:
|
||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- The mail server port.
|
- The mail server port.
|
||||||
- This must be a valid integer between 1 and 65534
|
- This must be a valid integer between V(1) and V(65534).
|
||||||
type: int
|
type: int
|
||||||
default: 25
|
default: 25
|
||||||
attach:
|
attach:
|
||||||
|
@ -103,7 +97,7 @@ options:
|
||||||
headers:
|
headers:
|
||||||
description:
|
description:
|
||||||
- A list of headers which should be added to the message.
|
- A list of headers which should be added to the message.
|
||||||
- Each individual header is specified as C(header=value) (see example below).
|
- Each individual header is specified as V(header=value) (see example below).
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
default: []
|
default: []
|
||||||
|
@ -121,12 +115,11 @@ options:
|
||||||
default: plain
|
default: plain
|
||||||
secure:
|
secure:
|
||||||
description:
|
description:
|
||||||
- If V(always), the connection will only send email if the connection is Encrypted.
|
- If V(always), the connection will only send email if the connection is Encrypted. If the server does not accept the encrypted connection
|
||||||
If the server doesn't accept the encrypted connection it will fail.
|
it will fail.
|
||||||
- If V(try), the connection will attempt to setup a secure SSL/TLS session, before trying to send.
|
- If V(try), the connection will attempt to setup a secure SSL/TLS session, before trying to send.
|
||||||
- If V(never), the connection will not attempt to setup a secure SSL/TLS session, before sending
|
- If V(never), the connection will not attempt to setup a secure SSL/TLS session, before sending.
|
||||||
- If V(starttls), the connection will try to upgrade to a secure SSL/TLS connection, before sending.
|
- If V(starttls), the connection will try to upgrade to a secure SSL/TLS connection, before sending. If it is unable to do so it will fail.
|
||||||
If it is unable to do so it will fail.
|
|
||||||
type: str
|
type: str
|
||||||
choices: [always, never, starttls, try]
|
choices: [always, never, starttls, try]
|
||||||
default: try
|
default: try
|
||||||
|
@ -147,9 +140,9 @@ options:
|
||||||
type: str
|
type: str
|
||||||
default: ansible
|
default: ansible
|
||||||
version_added: 8.2.0
|
version_added: 8.2.0
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Example playbook sending mail to root
|
- name: Example playbook sending mail to root
|
||||||
community.general.mail:
|
community.general.mail:
|
||||||
subject: System {{ ansible_hostname }} has been successfully provisioned.
|
subject: System {{ ansible_hostname }} has been successfully provisioned.
|
||||||
|
@ -222,7 +215,7 @@ EXAMPLES = r'''
|
||||||
subject: Ansible-report
|
subject: Ansible-report
|
||||||
body: System {{ ansible_hostname }} has been successfully provisioned.
|
body: System {{ ansible_hostname }} has been successfully provisioned.
|
||||||
secure: starttls
|
secure: starttls
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import smtplib
|
import smtplib
|
||||||
|
|
|
@ -8,8 +8,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: make
|
module: make
|
||||||
short_description: Run targets in a Makefile
|
short_description: Run targets in a Makefile
|
||||||
requirements:
|
requirements:
|
||||||
|
@ -65,9 +64,9 @@ options:
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
version_added: 7.2.0
|
version_added: 7.2.0
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Build the default target
|
- name: Build the default target
|
||||||
community.general.make:
|
community.general.make:
|
||||||
chdir: /home/ubuntu/cool-project
|
chdir: /home/ubuntu/cool-project
|
||||||
|
@ -103,9 +102,9 @@ EXAMPLES = r'''
|
||||||
# The following adds TARGET=arm64 TARGET_ARCH=aarch64 to the command line:
|
# The following adds TARGET=arm64 TARGET_ARCH=aarch64 to the command line:
|
||||||
TARGET: arm64
|
TARGET: arm64
|
||||||
TARGET_ARCH: aarch64
|
TARGET_ARCH: aarch64
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
chdir:
|
chdir:
|
||||||
description:
|
description:
|
||||||
- The value of the module parameter O(chdir).
|
- The value of the module parameter O(chdir).
|
||||||
|
@ -143,7 +142,7 @@ targets:
|
||||||
type: str
|
type: str
|
||||||
returned: success
|
returned: success
|
||||||
version_added: 7.2.0
|
version_added: 7.2.0
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.six import iteritems
|
from ansible.module_utils.six import iteritems
|
||||||
from ansible.module_utils.six.moves import shlex_quote
|
from ansible.module_utils.six.moves import shlex_quote
|
||||||
|
|
|
@ -8,8 +8,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: manageiq_alert_profiles
|
module: manageiq_alert_profiles
|
||||||
|
|
||||||
short_description: Configuration of alert profiles for ManageIQ
|
short_description: Configuration of alert profiles for ManageIQ
|
||||||
|
@ -20,7 +19,6 @@ extends_documentation_fragment:
|
||||||
author: Elad Alfassa (@elad661) <ealfassa@redhat.com>
|
author: Elad Alfassa (@elad661) <ealfassa@redhat.com>
|
||||||
description:
|
description:
|
||||||
- The manageiq_alert_profiles module supports adding, updating and deleting alert profiles in ManageIQ.
|
- The manageiq_alert_profiles module supports adding, updating and deleting alert profiles in ManageIQ.
|
||||||
|
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
support: none
|
support: none
|
||||||
|
@ -31,8 +29,8 @@ options:
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- absent - alert profile should not exist,
|
- V(absent) - alert profile should not exist,
|
||||||
- present - alert profile should exist,
|
- V(present) - alert profile should exist.
|
||||||
choices: ['absent', 'present']
|
choices: ['absent', 'present']
|
||||||
default: 'present'
|
default: 'present'
|
||||||
name:
|
name:
|
||||||
|
@ -43,23 +41,21 @@ options:
|
||||||
resource_type:
|
resource_type:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The resource type for the alert profile in ManageIQ. Required when state is "present".
|
- The resource type for the alert profile in ManageIQ. Required when O(state=present).
|
||||||
choices: ['Vm', 'ContainerNode', 'MiqServer', 'Host', 'Storage', 'EmsCluster',
|
choices: ['Vm', 'ContainerNode', 'MiqServer', 'Host', 'Storage', 'EmsCluster', 'ExtManagementSystem', 'MiddlewareServer']
|
||||||
'ExtManagementSystem', 'MiddlewareServer']
|
|
||||||
alerts:
|
alerts:
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
description:
|
description:
|
||||||
- List of alert descriptions to assign to this profile.
|
- List of alert descriptions to assign to this profile.
|
||||||
- Required if state is "present"
|
- Required if O(state=present).
|
||||||
notes:
|
notes:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Optional notes for this profile
|
- Optional notes for this profile.
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Add an alert profile to ManageIQ
|
- name: Add an alert profile to ManageIQ
|
||||||
community.general.manageiq_alert_profiles:
|
community.general.manageiq_alert_profiles:
|
||||||
state: present
|
state: present
|
||||||
|
@ -83,10 +79,10 @@ EXAMPLES = '''
|
||||||
username: 'admin'
|
username: 'admin'
|
||||||
password: 'smartvm'
|
password: 'smartvm'
|
||||||
validate_certs: false # only do this when you trust the network!
|
validate_certs: false # only do this when you trust the network!
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||||
|
|
|
@ -8,8 +8,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: manageiq_alerts
|
module: manageiq_alerts
|
||||||
|
|
||||||
short_description: Configuration of alerts in ManageIQ
|
short_description: Configuration of alerts in ManageIQ
|
||||||
|
@ -20,7 +19,6 @@ extends_documentation_fragment:
|
||||||
author: Elad Alfassa (@elad661) <ealfassa@redhat.com>
|
author: Elad Alfassa (@elad661) <ealfassa@redhat.com>
|
||||||
description:
|
description:
|
||||||
- The manageiq_alerts module supports adding, updating and deleting alerts in ManageIQ.
|
- The manageiq_alerts module supports adding, updating and deleting alerts in ManageIQ.
|
||||||
|
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
support: none
|
support: none
|
||||||
|
@ -31,8 +29,8 @@ options:
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- absent - alert should not exist,
|
- V(absent) - alert should not exist,
|
||||||
- present - alert should exist,
|
- V(present) - alert should exist.
|
||||||
required: false
|
required: false
|
||||||
choices: ['absent', 'present']
|
choices: ['absent', 'present']
|
||||||
default: 'present'
|
default: 'present'
|
||||||
|
@ -44,9 +42,8 @@ options:
|
||||||
resource_type:
|
resource_type:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The entity type for the alert in ManageIQ. Required when state is "present".
|
- The entity type for the alert in ManageIQ. Required when O(state=present).
|
||||||
choices: ['Vm', 'ContainerNode', 'MiqServer', 'Host', 'Storage', 'EmsCluster',
|
choices: ['Vm', 'ContainerNode', 'MiqServer', 'Host', 'Storage', 'EmsCluster', 'ExtManagementSystem', 'MiddlewareServer']
|
||||||
'ExtManagementSystem', 'MiddlewareServer']
|
|
||||||
expression_type:
|
expression_type:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
|
@ -58,20 +55,18 @@ options:
|
||||||
description:
|
description:
|
||||||
- The alert expression for ManageIQ.
|
- The alert expression for ManageIQ.
|
||||||
- Can either be in the "Miq Expression" format or the "Hash Expression format".
|
- Can either be in the "Miq Expression" format or the "Hash Expression format".
|
||||||
- Required if state is "present".
|
- Required if O(state=present).
|
||||||
enabled:
|
enabled:
|
||||||
description:
|
description:
|
||||||
- Enable or disable the alert. Required if state is "present".
|
- Enable or disable the alert. Required if O(state=present).
|
||||||
type: bool
|
type: bool
|
||||||
options:
|
options:
|
||||||
type: dict
|
type: dict
|
||||||
description:
|
description:
|
||||||
- Additional alert options, such as notification type and frequency
|
- Additional alert options, such as notification type and frequency.
|
||||||
|
"""
|
||||||
|
|
||||||
|
EXAMPLES = r"""
|
||||||
'''
|
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
- name: Add an alert with a "hash expression" to ManageIQ
|
- name: Add an alert with a "hash expression" to ManageIQ
|
||||||
community.general.manageiq_alerts:
|
community.general.manageiq_alerts:
|
||||||
state: present
|
state: present
|
||||||
|
@ -129,10 +124,10 @@ EXAMPLES = '''
|
||||||
username: 'admin'
|
username: 'admin'
|
||||||
password: 'smartvm'
|
password: 'smartvm'
|
||||||
validate_certs: false # only do this when you trust the network!
|
validate_certs: false # only do this when you trust the network!
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||||
|
|
|
@ -8,8 +8,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: manageiq_group
|
module: manageiq_group
|
||||||
|
|
||||||
short_description: Management of groups in ManageIQ
|
short_description: Management of groups in ManageIQ
|
||||||
|
@ -33,7 +32,8 @@ options:
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- absent - group should not exist, present - group should be.
|
- V(absent) - group should not exist,
|
||||||
|
- V(present) - group should exist.
|
||||||
choices: ['absent', 'present']
|
choices: ['absent', 'present']
|
||||||
default: 'present'
|
default: 'present'
|
||||||
description:
|
description:
|
||||||
|
@ -41,26 +41,24 @@ options:
|
||||||
description:
|
description:
|
||||||
- The group description.
|
- The group description.
|
||||||
required: true
|
required: true
|
||||||
default: null
|
|
||||||
role_id:
|
role_id:
|
||||||
type: int
|
type: int
|
||||||
description:
|
description:
|
||||||
- The the group role id
|
- The the group role id.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
|
||||||
role:
|
role:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The the group role name
|
- The the group role name.
|
||||||
- The O(role_id) has precedence over the O(role) when supplied.
|
- The O(role_id) has precedence over the O(role) when supplied.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default:
|
||||||
tenant_id:
|
tenant_id:
|
||||||
type: int
|
type: int
|
||||||
description:
|
description:
|
||||||
- The tenant for the group identified by the tenant id.
|
- The tenant for the group identified by the tenant id.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default:
|
||||||
tenant:
|
tenant:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
|
@ -68,12 +66,12 @@ options:
|
||||||
- The O(tenant_id) has precedence over the O(tenant) when supplied.
|
- The O(tenant_id) has precedence over the O(tenant) when supplied.
|
||||||
- Tenant names are case sensitive.
|
- Tenant names are case sensitive.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default:
|
||||||
managed_filters:
|
managed_filters:
|
||||||
description: The tag values per category
|
description: The tag values per category.
|
||||||
type: dict
|
type: dict
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default:
|
||||||
managed_filters_merge_mode:
|
managed_filters_merge_mode:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
|
@ -82,11 +80,11 @@ options:
|
||||||
choices: [merge, replace]
|
choices: [merge, replace]
|
||||||
default: replace
|
default: replace
|
||||||
belongsto_filters:
|
belongsto_filters:
|
||||||
description: A list of strings with a reference to the allowed host, cluster or folder
|
description: A list of strings with a reference to the allowed host, cluster or folder.
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default:
|
||||||
belongsto_filters_merge_mode:
|
belongsto_filters_merge_mode:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
|
@ -94,9 +92,9 @@ options:
|
||||||
- In replace mode current values are replaced with the supplied O(belongsto_filters).
|
- In replace mode current values are replaced with the supplied O(belongsto_filters).
|
||||||
choices: [merge, replace]
|
choices: [merge, replace]
|
||||||
default: replace
|
default: replace
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Create a group in ManageIQ with the role EvmRole-user and tenant 'my_tenant'
|
- name: Create a group in ManageIQ with the role EvmRole-user and tenant 'my_tenant'
|
||||||
community.general.manageiq_group:
|
community.general.manageiq_group:
|
||||||
description: 'MyGroup-user'
|
description: 'MyGroup-user'
|
||||||
|
@ -161,53 +159,53 @@ EXAMPLES = '''
|
||||||
manageiq_connection:
|
manageiq_connection:
|
||||||
url: 'http://127.0.0.1:3000'
|
url: 'http://127.0.0.1:3000'
|
||||||
token: 'sometoken'
|
token: 'sometoken'
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
group:
|
group:
|
||||||
description: The group.
|
description: The group.
|
||||||
returned: success
|
returned: success
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
description:
|
description:
|
||||||
description: The group description
|
description: The group description.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
id:
|
id:
|
||||||
description: The group id
|
description: The group id.
|
||||||
returned: success
|
returned: success
|
||||||
type: int
|
type: int
|
||||||
group_type:
|
group_type:
|
||||||
description: The group type, system or user
|
description: The group type, system or user.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
role:
|
role:
|
||||||
description: The group role name
|
description: The group role name.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
tenant:
|
tenant:
|
||||||
description: The group tenant name
|
description: The group tenant name.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
managed_filters:
|
managed_filters:
|
||||||
description: The tag values per category
|
description: The tag values per category.
|
||||||
returned: success
|
returned: success
|
||||||
type: dict
|
type: dict
|
||||||
belongsto_filters:
|
belongsto_filters:
|
||||||
description: A list of strings with a reference to the allowed host, cluster or folder
|
description: A list of strings with a reference to the allowed host, cluster or folder.
|
||||||
returned: success
|
returned: success
|
||||||
type: list
|
type: list
|
||||||
created_on:
|
created_on:
|
||||||
description: Group creation date
|
description: Group creation date.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
sample: "2018-08-12T08:37:55+00:00"
|
sample: "2018-08-12T08:37:55+00:00"
|
||||||
updated_on:
|
updated_on:
|
||||||
description: Group update date
|
description: Group update date.
|
||||||
returned: success
|
returned: success
|
||||||
type: int
|
type: int
|
||||||
sample: "2018-08-12T08:37:55+00:00"
|
sample: "2018-08-12T08:37:55+00:00"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: manageiq_policies
|
module: manageiq_policies
|
||||||
|
|
||||||
short_description: Management of resource policy_profiles in ManageIQ
|
short_description: Management of resource policy_profiles in ManageIQ
|
||||||
|
@ -21,7 +20,6 @@ extends_documentation_fragment:
|
||||||
author: Daniel Korn (@dkorn)
|
author: Daniel Korn (@dkorn)
|
||||||
description:
|
description:
|
||||||
- The manageiq_policies module supports adding and deleting policy_profiles in ManageIQ.
|
- The manageiq_policies module supports adding and deleting policy_profiles in ManageIQ.
|
||||||
|
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
support: none
|
support: none
|
||||||
|
@ -33,7 +31,7 @@ options:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- V(absent) - policy_profiles should not exist,
|
- V(absent) - policy_profiles should not exist,
|
||||||
- V(present) - policy_profiles should exist,
|
- V(present) - policy_profiles should exist.
|
||||||
choices: ['absent', 'present']
|
choices: ['absent', 'present']
|
||||||
default: 'present'
|
default: 'present'
|
||||||
policy_profiles:
|
policy_profiles:
|
||||||
|
@ -47,8 +45,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- The type of the resource to which the profile should be [un]assigned.
|
- The type of the resource to which the profile should be [un]assigned.
|
||||||
required: true
|
required: true
|
||||||
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster',
|
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', 'data store', 'group', 'resource pool', 'service', 'service template',
|
||||||
'data store', 'group', 'resource pool', 'service', 'service template',
|
|
||||||
'template', 'tenant', 'user']
|
'template', 'tenant', 'user']
|
||||||
resource_name:
|
resource_name:
|
||||||
type: str
|
type: str
|
||||||
|
@ -61,9 +58,9 @@ options:
|
||||||
- The ID of the resource to which the profile should be [un]assigned.
|
- The ID of the resource to which the profile should be [un]assigned.
|
||||||
- Must be specified if O(resource_name) is not set. Both options are mutually exclusive.
|
- Must be specified if O(resource_name) is not set. Both options are mutually exclusive.
|
||||||
version_added: 2.2.0
|
version_added: 2.2.0
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Assign new policy_profile for a provider in ManageIQ
|
- name: Assign new policy_profile for a provider in ManageIQ
|
||||||
community.general.manageiq_policies:
|
community.general.manageiq_policies:
|
||||||
resource_name: 'EngLab'
|
resource_name: 'EngLab'
|
||||||
|
@ -88,12 +85,12 @@ EXAMPLES = '''
|
||||||
username: 'admin'
|
username: 'admin'
|
||||||
password: 'smartvm'
|
password: 'smartvm'
|
||||||
validate_certs: false # only do this when you trust the network!
|
validate_certs: false # only do this when you trust the network!
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
manageiq_policies:
|
manageiq_policies:
|
||||||
description:
|
description:
|
||||||
- List current policy_profile and policies for a provider in ManageIQ
|
- List current policy_profile and policies for a provider in ManageIQ.
|
||||||
returned: always
|
returned: always
|
||||||
type: dict
|
type: dict
|
||||||
sample: '{
|
sample: '{
|
||||||
|
@ -122,7 +119,7 @@ manageiq_policies:
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec, manageiq_entities
|
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec, manageiq_entities
|
||||||
|
|
|
@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: manageiq_policies_info
|
module: manageiq_policies_info
|
||||||
version_added: 5.8.0
|
version_added: 5.8.0
|
||||||
|
|
||||||
|
@ -24,15 +23,13 @@ extends_documentation_fragment:
|
||||||
author: Alexei Znamensky (@russoz)
|
author: Alexei Znamensky (@russoz)
|
||||||
description:
|
description:
|
||||||
- The manageiq_policies module supports listing policy_profiles in ManageIQ.
|
- The manageiq_policies module supports listing policy_profiles in ManageIQ.
|
||||||
|
|
||||||
options:
|
options:
|
||||||
resource_type:
|
resource_type:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The type of the resource to obtain the profile for.
|
- The type of the resource to obtain the profile for.
|
||||||
required: true
|
required: true
|
||||||
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster',
|
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', 'data store', 'group', 'resource pool', 'service', 'service template',
|
||||||
'data store', 'group', 'resource pool', 'service', 'service template',
|
|
||||||
'template', 'tenant', 'user']
|
'template', 'tenant', 'user']
|
||||||
resource_name:
|
resource_name:
|
||||||
type: str
|
type: str
|
||||||
|
@ -44,9 +41,9 @@ options:
|
||||||
description:
|
description:
|
||||||
- The ID of the resource to obtain the profile for.
|
- The ID of the resource to obtain the profile for.
|
||||||
- Must be specified if O(resource_name) is not set. Both options are mutually exclusive.
|
- Must be specified if O(resource_name) is not set. Both options are mutually exclusive.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: List current policy_profile and policies for a provider in ManageIQ
|
- name: List current policy_profile and policies for a provider in ManageIQ
|
||||||
community.general.manageiq_policies_info:
|
community.general.manageiq_policies_info:
|
||||||
resource_name: 'EngLab'
|
resource_name: 'EngLab'
|
||||||
|
@ -56,9 +53,9 @@ EXAMPLES = '''
|
||||||
username: 'admin'
|
username: 'admin'
|
||||||
password: 'smartvm'
|
password: 'smartvm'
|
||||||
register: result
|
register: result
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
profiles:
|
profiles:
|
||||||
description:
|
description:
|
||||||
- List current policy_profile and policies for a provider in ManageIQ.
|
- List current policy_profile and policies for a provider in ManageIQ.
|
||||||
|
@ -78,7 +75,7 @@ profiles:
|
||||||
name: schedule compliance after smart state analysis
|
name: schedule compliance after smart state analysis
|
||||||
profile_description: OpenSCAP profile
|
profile_description: OpenSCAP profile
|
||||||
profile_name: openscap profile
|
profile_name: openscap profile
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec, manageiq_entities
|
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec, manageiq_entities
|
||||||
|
|
|
@ -9,7 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
module: manageiq_provider
|
module: manageiq_provider
|
||||||
short_description: Management of provider in ManageIQ
|
short_description: Management of provider in ManageIQ
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -19,7 +19,6 @@ extends_documentation_fragment:
|
||||||
author: Daniel Korn (@dkorn)
|
author: Daniel Korn (@dkorn)
|
||||||
description:
|
description:
|
||||||
- The manageiq_provider module supports adding, updating, and deleting provider in ManageIQ.
|
- The manageiq_provider module supports adding, updating, and deleting provider in ManageIQ.
|
||||||
|
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
support: none
|
support: none
|
||||||
|
@ -30,7 +29,9 @@ options:
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- absent - provider should not exist, present - provider should be present, refresh - provider will be refreshed
|
- V(absent) - provider should not exist,
|
||||||
|
- V(present) - provider should be present,
|
||||||
|
- V(refresh) - provider will be refreshed.
|
||||||
choices: ['absent', 'present', 'refresh']
|
choices: ['absent', 'present', 'refresh']
|
||||||
default: 'present'
|
default: 'present'
|
||||||
name:
|
name:
|
||||||
|
@ -47,19 +48,19 @@ options:
|
||||||
default: 'default'
|
default: 'default'
|
||||||
provider_region:
|
provider_region:
|
||||||
type: str
|
type: str
|
||||||
description: The provider region name to connect to (e.g. AWS region for Amazon).
|
description: The provider region name to connect to (for example AWS region for Amazon).
|
||||||
host_default_vnc_port_start:
|
host_default_vnc_port_start:
|
||||||
type: str
|
type: str
|
||||||
description: The first port in the host VNC range. defaults to None.
|
description: The first port in the host VNC range.
|
||||||
host_default_vnc_port_end:
|
host_default_vnc_port_end:
|
||||||
type: str
|
type: str
|
||||||
description: The last port in the host VNC range. defaults to None.
|
description: The last port in the host VNC range.
|
||||||
subscription:
|
subscription:
|
||||||
type: str
|
type: str
|
||||||
description: Microsoft Azure subscription ID. defaults to None.
|
description: Microsoft Azure subscription ID.
|
||||||
project:
|
project:
|
||||||
type: str
|
type: str
|
||||||
description: Google Compute Engine Project ID. defaults to None.
|
description: Google Compute Engine Project ID.
|
||||||
azure_tenant_id:
|
azure_tenant_id:
|
||||||
type: str
|
type: str
|
||||||
description: Tenant ID. defaults to None.
|
description: Tenant ID. defaults to None.
|
||||||
|
@ -67,10 +68,10 @@ options:
|
||||||
tenant_mapping_enabled:
|
tenant_mapping_enabled:
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
description: Whether to enable mapping of existing tenants. defaults to False.
|
description: Whether to enable mapping of existing tenants.
|
||||||
api_version:
|
api_version:
|
||||||
type: str
|
type: str
|
||||||
description: The OpenStack Keystone API version. defaults to None.
|
description: The OpenStack Keystone API version.
|
||||||
choices: ['v2', 'v3']
|
choices: ['v2', 'v3']
|
||||||
|
|
||||||
provider:
|
provider:
|
||||||
|
@ -79,32 +80,32 @@ options:
|
||||||
suboptions:
|
suboptions:
|
||||||
hostname:
|
hostname:
|
||||||
type: str
|
type: str
|
||||||
description: The provider's api hostname.
|
description: The provider's API hostname.
|
||||||
required: true
|
required: true
|
||||||
port:
|
port:
|
||||||
type: int
|
type: int
|
||||||
description: The provider's api port.
|
description: The provider's API port.
|
||||||
userid:
|
userid:
|
||||||
type: str
|
type: str
|
||||||
description: Provider's api endpoint authentication userid. defaults to None.
|
description: Provider's API endpoint authentication userid.
|
||||||
password:
|
password:
|
||||||
type: str
|
type: str
|
||||||
description: Provider's api endpoint authentication password. defaults to None.
|
description: Provider's API endpoint authentication password.
|
||||||
auth_key:
|
auth_key:
|
||||||
type: str
|
type: str
|
||||||
description: Provider's api endpoint authentication bearer token. defaults to None.
|
description: Provider's API endpoint authentication bearer token.
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True.
|
description: Whether SSL certificates should be verified for HTTPS requests (deprecated).
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
aliases: [verify_ssl]
|
aliases: [verify_ssl]
|
||||||
security_protocol:
|
security_protocol:
|
||||||
type: str
|
type: str
|
||||||
description: How SSL certificates should be used for HTTPS requests. defaults to None.
|
description: How SSL certificates should be used for HTTPS requests.
|
||||||
choices: ['ssl-with-validation', 'ssl-with-validation-custom-ca', 'ssl-without-validation', 'non-ssl']
|
choices: ['ssl-with-validation', 'ssl-with-validation-custom-ca', 'ssl-without-validation', 'non-ssl']
|
||||||
certificate_authority:
|
certificate_authority:
|
||||||
type: str
|
type: str
|
||||||
description: The CA bundle string with custom certificates. defaults to None.
|
description: The CA bundle string with custom certificates.
|
||||||
path:
|
path:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
|
@ -125,39 +126,38 @@ options:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- TODO needs documentation.
|
- TODO needs documentation.
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
description: Metrics endpoint connection information.
|
description: Metrics endpoint connection information.
|
||||||
type: dict
|
type: dict
|
||||||
suboptions:
|
suboptions:
|
||||||
hostname:
|
hostname:
|
||||||
type: str
|
type: str
|
||||||
description: The provider's api hostname.
|
description: The provider's API hostname.
|
||||||
required: true
|
required: true
|
||||||
port:
|
port:
|
||||||
type: int
|
type: int
|
||||||
description: The provider's api port.
|
description: The provider's API port.
|
||||||
userid:
|
userid:
|
||||||
type: str
|
type: str
|
||||||
description: Provider's api endpoint authentication userid. defaults to None.
|
description: Provider's API endpoint authentication userid.
|
||||||
password:
|
password:
|
||||||
type: str
|
type: str
|
||||||
description: Provider's api endpoint authentication password. defaults to None.
|
description: Provider's API endpoint authentication password.
|
||||||
auth_key:
|
auth_key:
|
||||||
type: str
|
type: str
|
||||||
description: Provider's api endpoint authentication bearer token. defaults to None.
|
description: Provider's API endpoint authentication bearer token.
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True.
|
description: Whether SSL certificates should be verified for HTTPS requests (deprecated).
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
aliases: [verify_ssl]
|
aliases: [verify_ssl]
|
||||||
security_protocol:
|
security_protocol:
|
||||||
type: str
|
type: str
|
||||||
choices: ['ssl-with-validation', 'ssl-with-validation-custom-ca', 'ssl-without-validation', 'non-ssl']
|
choices: ['ssl-with-validation', 'ssl-with-validation-custom-ca', 'ssl-without-validation', 'non-ssl']
|
||||||
description: How SSL certificates should be used for HTTPS requests. defaults to None.
|
description: How SSL certificates should be used for HTTPS requests.
|
||||||
certificate_authority:
|
certificate_authority:
|
||||||
type: str
|
type: str
|
||||||
description: The CA bundle string with custom certificates. defaults to None.
|
description: The CA bundle string with custom certificates.
|
||||||
path:
|
path:
|
||||||
type: str
|
type: str
|
||||||
description: Database name for oVirt metrics. Defaults to V(ovirt_engine_history).
|
description: Database name for oVirt metrics. Defaults to V(ovirt_engine_history).
|
||||||
|
@ -177,27 +177,26 @@ options:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- TODO needs documentation.
|
- TODO needs documentation.
|
||||||
|
|
||||||
alerts:
|
alerts:
|
||||||
description: Alerts endpoint connection information.
|
description: Alerts endpoint connection information.
|
||||||
type: dict
|
type: dict
|
||||||
suboptions:
|
suboptions:
|
||||||
hostname:
|
hostname:
|
||||||
type: str
|
type: str
|
||||||
description: The provider's api hostname.
|
description: The provider's API hostname.
|
||||||
required: true
|
required: true
|
||||||
port:
|
port:
|
||||||
type: int
|
type: int
|
||||||
description: The provider's api port.
|
description: The provider's API port.
|
||||||
userid:
|
userid:
|
||||||
type: str
|
type: str
|
||||||
description: Provider's api endpoint authentication userid. defaults to None.
|
description: Provider's API endpoint authentication userid. defaults to None.
|
||||||
password:
|
password:
|
||||||
type: str
|
type: str
|
||||||
description: Provider's api endpoint authentication password. defaults to None.
|
description: Provider's API endpoint authentication password. defaults to None.
|
||||||
auth_key:
|
auth_key:
|
||||||
type: str
|
type: str
|
||||||
description: Provider's api endpoint authentication bearer token. defaults to None.
|
description: Provider's API endpoint authentication bearer token. defaults to None.
|
||||||
validate_certs:
|
validate_certs:
|
||||||
type: bool
|
type: bool
|
||||||
description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True.
|
description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True.
|
||||||
|
@ -230,7 +229,6 @@ options:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- TODO needs documentation.
|
- TODO needs documentation.
|
||||||
|
|
||||||
ssh_keypair:
|
ssh_keypair:
|
||||||
description: SSH key pair used for SSH connections to all hosts in this provider.
|
description: SSH key pair used for SSH connections to all hosts in this provider.
|
||||||
type: dict
|
type: dict
|
||||||
|
@ -288,9 +286,9 @@ options:
|
||||||
type: int
|
type: int
|
||||||
description:
|
description:
|
||||||
- TODO needs documentation.
|
- TODO needs documentation.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Create a new provider in ManageIQ ('Hawkular' metrics)
|
- name: Create a new provider in ManageIQ ('Hawkular' metrics)
|
||||||
community.general.manageiq_provider:
|
community.general.manageiq_provider:
|
||||||
name: 'EngLab'
|
name: 'EngLab'
|
||||||
|
@ -507,10 +505,10 @@ EXAMPLES = '''
|
||||||
hostname: 'gce.example.com'
|
hostname: 'gce.example.com'
|
||||||
auth_key: 'google_json_key'
|
auth_key: 'google_json_key'
|
||||||
validate_certs: 'false'
|
validate_certs: 'false'
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: manageiq_tags
|
module: manageiq_tags
|
||||||
|
|
||||||
short_description: Management of resource tags in ManageIQ
|
short_description: Management of resource tags in ManageIQ
|
||||||
|
@ -21,7 +20,6 @@ extends_documentation_fragment:
|
||||||
author: Daniel Korn (@dkorn)
|
author: Daniel Korn (@dkorn)
|
||||||
description:
|
description:
|
||||||
- The manageiq_tags module supports adding, updating and deleting tags in ManageIQ.
|
- The manageiq_tags module supports adding, updating and deleting tags in ManageIQ.
|
||||||
|
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
support: none
|
support: none
|
||||||
|
@ -32,7 +30,7 @@ options:
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- V(absent) - tags should not exist.
|
- V(absent) - tags should not exist,
|
||||||
- V(present) - tags should exist.
|
- V(present) - tags should exist.
|
||||||
choices: ['absent', 'present']
|
choices: ['absent', 'present']
|
||||||
default: 'present'
|
default: 'present'
|
||||||
|
@ -47,8 +45,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- The relevant resource type in manageiq.
|
- The relevant resource type in manageiq.
|
||||||
required: true
|
required: true
|
||||||
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster',
|
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', 'data store', 'group', 'resource pool', 'service', 'service template',
|
||||||
'data store', 'group', 'resource pool', 'service', 'service template',
|
|
||||||
'template', 'tenant', 'user']
|
'template', 'tenant', 'user']
|
||||||
resource_name:
|
resource_name:
|
||||||
type: str
|
type: str
|
||||||
|
@ -61,9 +58,9 @@ options:
|
||||||
- Must be specified if O(resource_name) is not set. Both options are mutually exclusive.
|
- Must be specified if O(resource_name) is not set. Both options are mutually exclusive.
|
||||||
type: int
|
type: int
|
||||||
version_added: 2.2.0
|
version_added: 2.2.0
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Create new tags for a provider in ManageIQ.
|
- name: Create new tags for a provider in ManageIQ.
|
||||||
community.general.manageiq_tags:
|
community.general.manageiq_tags:
|
||||||
resource_name: 'EngLab'
|
resource_name: 'EngLab'
|
||||||
|
@ -109,10 +106,10 @@ EXAMPLES = '''
|
||||||
username: 'admin'
|
username: 'admin'
|
||||||
password: 'smartvm'
|
password: 'smartvm'
|
||||||
validate_certs: false # only do this when connecting to localhost!
|
validate_certs: false # only do this when connecting to localhost!
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import (
|
from ansible_collections.community.general.plugins.module_utils.manageiq import (
|
||||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: manageiq_tags_info
|
module: manageiq_tags_info
|
||||||
version_added: 5.8.0
|
version_added: 5.8.0
|
||||||
short_description: Retrieve resource tags in ManageIQ
|
short_description: Retrieve resource tags in ManageIQ
|
||||||
|
@ -22,15 +21,13 @@ extends_documentation_fragment:
|
||||||
author: Alexei Znamensky (@russoz)
|
author: Alexei Znamensky (@russoz)
|
||||||
description:
|
description:
|
||||||
- This module supports retrieving resource tags from ManageIQ.
|
- This module supports retrieving resource tags from ManageIQ.
|
||||||
|
|
||||||
options:
|
options:
|
||||||
resource_type:
|
resource_type:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The relevant resource type in ManageIQ.
|
- The relevant resource type in ManageIQ.
|
||||||
required: true
|
required: true
|
||||||
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster',
|
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', 'data store', 'group', 'resource pool', 'service', 'service template',
|
||||||
'data store', 'group', 'resource pool', 'service', 'service template',
|
|
||||||
'template', 'tenant', 'user']
|
'template', 'tenant', 'user']
|
||||||
resource_name:
|
resource_name:
|
||||||
type: str
|
type: str
|
||||||
|
@ -42,9 +39,9 @@ options:
|
||||||
- The ID of the resource at which tags will be controlled.
|
- The ID of the resource at which tags will be controlled.
|
||||||
- Must be specified if O(resource_name) is not set. Both options are mutually exclusive.
|
- Must be specified if O(resource_name) is not set. Both options are mutually exclusive.
|
||||||
type: int
|
type: int
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: List current tags for a provider in ManageIQ.
|
- name: List current tags for a provider in ManageIQ.
|
||||||
community.general.manageiq_tags_info:
|
community.general.manageiq_tags_info:
|
||||||
resource_name: 'EngLab'
|
resource_name: 'EngLab'
|
||||||
|
@ -54,15 +51,15 @@ EXAMPLES = '''
|
||||||
username: 'admin'
|
username: 'admin'
|
||||||
password: 'smartvm'
|
password: 'smartvm'
|
||||||
register: result
|
register: result
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
tags:
|
tags:
|
||||||
description: List of tags associated with the resource.
|
description: List of tags associated with the resource.
|
||||||
returned: on success
|
returned: on success
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import (
|
from ansible_collections.community.general.plugins.module_utils.manageiq import (
|
||||||
|
|
|
@ -8,8 +8,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: manageiq_tenant
|
module: manageiq_tenant
|
||||||
|
|
||||||
short_description: Management of tenants in ManageIQ
|
short_description: Management of tenants in ManageIQ
|
||||||
|
@ -31,7 +30,8 @@ options:
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- absent - tenant should not exist, present - tenant should be.
|
- V(absent) - tenant should not exist,
|
||||||
|
- V(present) - tenant should be.
|
||||||
choices: ['absent', 'present']
|
choices: ['absent', 'present']
|
||||||
default: 'present'
|
default: 'present'
|
||||||
name:
|
name:
|
||||||
|
@ -39,42 +39,42 @@ options:
|
||||||
description:
|
description:
|
||||||
- The tenant name.
|
- The tenant name.
|
||||||
required: true
|
required: true
|
||||||
default: null
|
default:
|
||||||
description:
|
description:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The tenant description.
|
- The tenant description.
|
||||||
required: true
|
required: true
|
||||||
default: null
|
default:
|
||||||
parent_id:
|
parent_id:
|
||||||
type: int
|
type: int
|
||||||
description:
|
description:
|
||||||
- The id of the parent tenant. If not supplied the root tenant is used.
|
- The id of the parent tenant. If not supplied the root tenant is used.
|
||||||
- The O(parent_id) takes president over O(parent) when supplied
|
- The O(parent_id) takes president over O(parent) when supplied.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default:
|
||||||
parent:
|
parent:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The name of the parent tenant. If not supplied and no O(parent_id) is supplied the root tenant is used.
|
- The name of the parent tenant. If not supplied and no O(parent_id) is supplied the root tenant is used.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default:
|
||||||
quotas:
|
quotas:
|
||||||
type: dict
|
type: dict
|
||||||
description:
|
description:
|
||||||
- The tenant quotas.
|
- The tenant quotas.
|
||||||
- All parameters case sensitive.
|
- All parameters case sensitive.
|
||||||
- 'Valid attributes are:'
|
- 'Valid attributes are:'
|
||||||
- ' - C(cpu_allocated) (int): use null to remove the quota.'
|
- '- V(cpu_allocated) (int): use null to remove the quota.'
|
||||||
- ' - C(mem_allocated) (GB): use null to remove the quota.'
|
- '- V(mem_allocated) (GB): use null to remove the quota.'
|
||||||
- ' - C(storage_allocated) (GB): use null to remove the quota.'
|
- '- V(storage_allocated) (GB): use null to remove the quota.'
|
||||||
- ' - C(vms_allocated) (int): use null to remove the quota.'
|
- '- V(vms_allocated) (int): use null to remove the quota.'
|
||||||
- ' - C(templates_allocated) (int): use null to remove the quota.'
|
- '- V(templates_allocated) (int): use null to remove the quota.'
|
||||||
required: false
|
required: false
|
||||||
default: {}
|
default: {}
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Update the root tenant in ManageIQ
|
- name: Update the root tenant in ManageIQ
|
||||||
community.general.manageiq_tenant:
|
community.general.manageiq_tenant:
|
||||||
name: 'My Company'
|
name: 'My Company'
|
||||||
|
@ -114,7 +114,7 @@ EXAMPLES = '''
|
||||||
quotas:
|
quotas:
|
||||||
- cpu_allocated: 100
|
- cpu_allocated: 100
|
||||||
- mem_allocated: 50
|
- mem_allocated: 50
|
||||||
- vms_allocated: null
|
- vms_allocated:
|
||||||
manageiq_connection:
|
manageiq_connection:
|
||||||
url: 'http://127.0.0.1:3000'
|
url: 'http://127.0.0.1:3000'
|
||||||
username: 'admin'
|
username: 'admin'
|
||||||
|
@ -131,38 +131,38 @@ EXAMPLES = '''
|
||||||
url: 'http://127.0.0.1:3000'
|
url: 'http://127.0.0.1:3000'
|
||||||
token: 'sometoken'
|
token: 'sometoken'
|
||||||
validate_certs: false # only do this when you trust the network!
|
validate_certs: false # only do this when you trust the network!
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
tenant:
|
tenant:
|
||||||
description: The tenant.
|
description: The tenant.
|
||||||
returned: success
|
returned: success
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
id:
|
id:
|
||||||
description: The tenant id
|
description: The tenant id.
|
||||||
returned: success
|
returned: success
|
||||||
type: int
|
type: int
|
||||||
name:
|
name:
|
||||||
description: The tenant name
|
description: The tenant name.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
description: The tenant description
|
description: The tenant description.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
parent_id:
|
parent_id:
|
||||||
description: The id of the parent tenant
|
description: The id of the parent tenant.
|
||||||
returned: success
|
returned: success
|
||||||
type: int
|
type: int
|
||||||
quotas:
|
quotas:
|
||||||
description: List of tenant quotas
|
description: List of tenant quotas.
|
||||||
returned: success
|
returned: success
|
||||||
type: list
|
type: list
|
||||||
sample:
|
sample:
|
||||||
cpu_allocated: 100
|
cpu_allocated: 100
|
||||||
mem_allocated: 50
|
mem_allocated: 50
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||||
|
|
|
@ -8,8 +8,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
|
|
||||||
module: manageiq_user
|
module: manageiq_user
|
||||||
|
|
||||||
short_description: Management of users in ManageIQ
|
short_description: Management of users in ManageIQ
|
||||||
|
@ -20,7 +19,6 @@ extends_documentation_fragment:
|
||||||
author: Daniel Korn (@dkorn)
|
author: Daniel Korn (@dkorn)
|
||||||
description:
|
description:
|
||||||
- The manageiq_user module supports adding, updating and deleting users in ManageIQ.
|
- The manageiq_user module supports adding, updating and deleting users in ManageIQ.
|
||||||
|
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
support: none
|
support: none
|
||||||
|
@ -31,7 +29,8 @@ options:
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- absent - user should not exist, present - user should be.
|
- V(absent) - user should not exist,
|
||||||
|
- V(present) - user should be.
|
||||||
choices: ['absent', 'present']
|
choices: ['absent', 'present']
|
||||||
default: 'present'
|
default: 'present'
|
||||||
userid:
|
userid:
|
||||||
|
@ -60,10 +59,11 @@ options:
|
||||||
default: always
|
default: always
|
||||||
choices: ['always', 'on_create']
|
choices: ['always', 'on_create']
|
||||||
description:
|
description:
|
||||||
- V(always) will update passwords unconditionally. V(on_create) will only set the password for a newly created user.
|
- V(always) will update passwords unconditionally.
|
||||||
'''
|
- V(on_create) will only set the password for a newly created user.
|
||||||
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Create a new user in ManageIQ
|
- name: Create a new user in ManageIQ
|
||||||
community.general.manageiq_user:
|
community.general.manageiq_user:
|
||||||
userid: 'jdoe'
|
userid: 'jdoe'
|
||||||
|
@ -126,10 +126,10 @@ EXAMPLES = '''
|
||||||
url: 'http://127.0.0.1:3000'
|
url: 'http://127.0.0.1:3000'
|
||||||
token: 'sometoken'
|
token: 'sometoken'
|
||||||
validate_certs: false # only do this when you trust the network!
|
validate_certs: false # only do this when you trust the network!
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||||
|
|
|
@ -10,7 +10,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
module: mas
|
module: mas
|
||||||
short_description: Manage Mac App Store applications with mas-cli
|
short_description: Manage Mac App Store applications with mas-cli
|
||||||
description:
|
description:
|
||||||
|
@ -50,14 +50,14 @@ options:
|
||||||
default: false
|
default: false
|
||||||
aliases: ["upgrade"]
|
aliases: ["upgrade"]
|
||||||
requirements:
|
requirements:
|
||||||
- macOS 10.11+
|
- macOS 10.11 or higher.
|
||||||
- "mas-cli (U(https://github.com/mas-cli/mas)) 1.5.0+ available as C(mas) in the bin path"
|
- "mas-cli (U(https://github.com/mas-cli/mas)) 1.5.0+ available as C(mas) in the bin path"
|
||||||
- The Apple ID to use already needs to be signed in to the Mac App Store (check with C(mas account)).
|
- The Apple ID to use already needs to be signed in to the Mac App Store (check with C(mas account)).
|
||||||
- The feature of "checking if user is signed in" is disabled for anyone using macOS 12.0+.
|
- The feature of "checking if user is signed in" is disabled for anyone using macOS 12.0+.
|
||||||
- Users need to sign in via the Mac App Store GUI beforehand for anyone using macOS 12.0+ due to U(https://github.com/mas-cli/mas/issues/417).
|
- Users need to sign in to the Mac App Store GUI beforehand for anyone using macOS 12.0+ due to U(https://github.com/mas-cli/mas/issues/417).
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Install Keynote
|
- name: Install Keynote
|
||||||
community.general.mas:
|
community.general.mas:
|
||||||
id: 409183694
|
id: 409183694
|
||||||
|
@ -99,9 +99,9 @@ EXAMPLES = '''
|
||||||
id: 413857545
|
id: 413857545
|
||||||
state: absent
|
state: absent
|
||||||
become: true # Uninstallation requires root permissions
|
become: true # Uninstallation requires root permissions
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r''' # '''
|
RETURN = r""" # """
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
author: "Jan Christian Grünhage (@jcgruenhage)"
|
author: "Jan Christian Grünhage (@jcgruenhage)"
|
||||||
module: matrix
|
module: matrix
|
||||||
short_description: Send notifications to matrix
|
short_description: Send notifications to matrix
|
||||||
|
@ -26,40 +25,40 @@ options:
|
||||||
msg_plain:
|
msg_plain:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Plain text form of the message to send to matrix, usually markdown
|
- Plain text form of the message to send to matrix, usually markdown.
|
||||||
required: true
|
required: true
|
||||||
msg_html:
|
msg_html:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- HTML form of the message to send to matrix
|
- HTML form of the message to send to matrix.
|
||||||
required: true
|
required: true
|
||||||
room_id:
|
room_id:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- ID of the room to send the notification to
|
- ID of the room to send the notification to.
|
||||||
required: true
|
required: true
|
||||||
hs_url:
|
hs_url:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- URL of the homeserver, where the CS-API is reachable
|
- URL of the homeserver, where the CS-API is reachable.
|
||||||
required: true
|
required: true
|
||||||
token:
|
token:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Authentication token for the API call. If provided, user_id and password are not required
|
- Authentication token for the API call. If provided, O(user_id) and O(password) are not required.
|
||||||
user_id:
|
user_id:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The user id of the user
|
- The user id of the user.
|
||||||
password:
|
password:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The password to log in with
|
- The password to log in with.
|
||||||
requirements:
|
requirements:
|
||||||
- matrix-client (Python library)
|
- matrix-client (Python library)
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Send matrix notification with token
|
- name: Send matrix notification with token
|
||||||
community.general.matrix:
|
community.general.matrix:
|
||||||
msg_plain: "**hello world**"
|
msg_plain: "**hello world**"
|
||||||
|
@ -76,10 +75,10 @@ EXAMPLES = '''
|
||||||
hs_url: "https://matrix.org"
|
hs_url: "https://matrix.org"
|
||||||
user_id: "ansible_notification_bot"
|
user_id: "ansible_notification_bot"
|
||||||
password: "{{ matrix_auth_password }}"
|
password: "{{ matrix_auth_password }}"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||||
|
|
|
@ -15,11 +15,11 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
module: mattermost
|
module: mattermost
|
||||||
short_description: Send Mattermost notifications
|
short_description: Send Mattermost notifications
|
||||||
description:
|
description:
|
||||||
- Sends notifications to U(http://your.mattermost.url) via the Incoming WebHook integration.
|
- Sends notifications to U(http://your.mattermost.url) using the Incoming WebHook integration.
|
||||||
author: "Benjamin Jolivot (@bjolivot)"
|
author: "Benjamin Jolivot (@bjolivot)"
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
@ -32,15 +32,13 @@ options:
|
||||||
url:
|
url:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Mattermost url (i.e. http://mattermost.yourcompany.com).
|
- Mattermost url (for example V(http://mattermost.yourcompany.com)).
|
||||||
required: true
|
required: true
|
||||||
api_key:
|
api_key:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Mattermost webhook api key. Log into your mattermost site, go to
|
- Mattermost webhook api key. Log into your mattermost site, go to Menu -> Integration -> Incoming Webhook -> Add Incoming Webhook. This
|
||||||
Menu -> Integration -> Incoming Webhook -> Add Incoming Webhook.
|
will give you full URL. O(api_key) is the last part. U(http://mattermost.example.com/hooks/API_KEY).
|
||||||
This will give you full URL. O(api_key) is the last part.
|
|
||||||
http://mattermost.example.com/hooks/C(API_KEY)
|
|
||||||
required: true
|
required: true
|
||||||
text:
|
text:
|
||||||
type: str
|
type: str
|
||||||
|
@ -77,13 +75,12 @@ options:
|
||||||
version_added: 10.0.0
|
version_added: 10.0.0
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If V(false), SSL certificates will not be validated. This should only be used
|
- If V(false), 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.
|
|
||||||
default: true
|
default: true
|
||||||
type: bool
|
type: bool
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = r"""
|
||||||
- name: Send notification message via Mattermost
|
- name: Send notification message via Mattermost
|
||||||
community.general.mattermost:
|
community.general.mattermost:
|
||||||
url: http://mattermost.example.com
|
url: http://mattermost.example.com
|
||||||
|
@ -117,16 +114,16 @@ EXAMPLES = """
|
||||||
short: true
|
short: true
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
payload:
|
payload:
|
||||||
description: Mattermost payload
|
description: Mattermost payload.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
webhook_url:
|
webhook_url:
|
||||||
description: URL the webhook is sent to
|
description: URL the webhook is sent to.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.urls import fetch_url
|
from ansible.module_utils.urls import fetch_url
|
||||||
|
|
|
@ -11,14 +11,12 @@
|
||||||
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: maven_artifact
|
module: maven_artifact
|
||||||
short_description: Downloads an Artifact from a Maven Repository
|
short_description: Downloads an Artifact from a Maven Repository
|
||||||
description:
|
description:
|
||||||
- Downloads an artifact from a maven repository given the maven coordinates provided to the module.
|
- Downloads an artifact from a maven repository given the maven coordinates provided to the module.
|
||||||
- Can retrieve snapshots or release versions of the artifact and will resolve the latest available
|
- Can retrieve snapshots or release versions of the artifact and will resolve the latest available version if one is not available.
|
||||||
version if one is not available.
|
|
||||||
author: "Chris Schmidt (@chrisisbeef)"
|
author: "Chris Schmidt (@chrisisbeef)"
|
||||||
requirements:
|
requirements:
|
||||||
- lxml
|
- lxml
|
||||||
|
@ -48,7 +46,7 @@ options:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The maven dependency version ranges.
|
- The maven dependency version ranges.
|
||||||
- See supported version ranges on U(https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution)
|
- See supported version ranges on U(https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution).
|
||||||
- The range type V((,1.0],[1.2,\)) and V((,1.1\),(1.1,\)) is not supported.
|
- The range type V((,1.0],[1.2,\)) and V((,1.1\),(1.1,\)) is not supported.
|
||||||
- Mutually exclusive with O(version).
|
- Mutually exclusive with O(version).
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
|
@ -85,10 +83,9 @@ options:
|
||||||
type: dict
|
type: dict
|
||||||
force_basic_auth:
|
force_basic_auth:
|
||||||
description:
|
description:
|
||||||
- httplib2, the library used by the uri module only sends authentication information when a webservice
|
- Httplib2, the library used by the uri module only sends authentication information when a webservice responds to an initial request with
|
||||||
responds to an initial request with a 401 status. Since some basic auth services do not properly
|
a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic
|
||||||
send a 401, logins will fail. This option forces the sending of the Basic authentication header
|
authentication header upon initial request.
|
||||||
upon initial request.
|
|
||||||
default: false
|
default: false
|
||||||
type: bool
|
type: bool
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
|
@ -128,9 +125,8 @@ options:
|
||||||
version_added: '1.3.0'
|
version_added: '1.3.0'
|
||||||
keep_name:
|
keep_name:
|
||||||
description:
|
description:
|
||||||
- If V(true), the downloaded artifact's name is preserved, i.e the version number remains part of it.
|
- If V(true), the downloaded artifact's name is preserved, in other words the version number remains part of it.
|
||||||
- This option only has effect when O(dest) is a directory and O(version) is set to V(latest) or O(version_by_spec)
|
- This option only has effect when O(dest) is a directory and O(version) is set to V(latest) or O(version_by_spec) is defined.
|
||||||
is defined.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
verify_checksum:
|
verify_checksum:
|
||||||
|
@ -138,12 +134,10 @@ options:
|
||||||
description:
|
description:
|
||||||
- If V(never), the MD5/SHA1 checksum will never be downloaded and verified.
|
- If V(never), the MD5/SHA1 checksum will never be downloaded and verified.
|
||||||
- If V(download), the MD5/SHA1 checksum will be downloaded and verified only after artifact download. This is the default.
|
- If V(download), the MD5/SHA1 checksum will be downloaded and verified only after artifact download. This is the default.
|
||||||
- If V(change), the MD5/SHA1 checksum will be downloaded and verified if the destination already exist,
|
- If V(change), the MD5/SHA1 checksum will be downloaded and verified if the destination already exist, to verify if they are identical.
|
||||||
to verify if they are identical. This was the behaviour before 2.6. Since it downloads the checksum before (maybe)
|
This was the behaviour before 2.6. Since it downloads the checksum before (maybe) downloading the artifact, and since some repository
|
||||||
downloading the artifact, and since some repository software, when acting as a proxy/cache, return a 404 error
|
software, when acting as a proxy/cache, return a 404 error if the artifact has not been cached yet, it may fail unexpectedly. If you still
|
||||||
if the artifact has not been cached yet, it may fail unexpectedly.
|
need it, you should consider using V(always) instead - if you deal with a checksum, it is better to use it to verify integrity after download.
|
||||||
If you still need it, you should consider using V(always) instead - if you deal with a checksum, it is better to
|
|
||||||
use it to verify integrity after download.
|
|
||||||
- V(always) combines V(download) and V(change).
|
- V(always) combines V(download) and V(change).
|
||||||
required: false
|
required: false
|
||||||
default: 'download'
|
default: 'download'
|
||||||
|
@ -152,8 +146,8 @@ options:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- If V(md5), checksums will use the MD5 algorithm. This is the default.
|
- If V(md5), checksums will use the MD5 algorithm. This is the default.
|
||||||
- If V(sha1), checksums will use the SHA1 algorithm. This can be used on systems configured to use
|
- If V(sha1), checksums will use the SHA1 algorithm. This can be used on systems configured to use FIPS-compliant algorithms, since MD5
|
||||||
FIPS-compliant algorithms, since MD5 will be blocked on such systems.
|
will be blocked on such systems.
|
||||||
default: 'md5'
|
default: 'md5'
|
||||||
choices: ['md5', 'sha1']
|
choices: ['md5', 'sha1']
|
||||||
version_added: 3.2.0
|
version_added: 3.2.0
|
||||||
|
@ -173,9 +167,9 @@ options:
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- ansible.builtin.files
|
- ansible.builtin.files
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Download the latest version of the JUnit framework artifact from Maven Central
|
- name: Download the latest version of the JUnit framework artifact from Maven Central
|
||||||
community.general.maven_artifact:
|
community.general.maven_artifact:
|
||||||
group_id: junit
|
group_id: junit
|
||||||
|
@ -236,7 +230,7 @@ EXAMPLES = '''
|
||||||
artifact_id: junit
|
artifact_id: junit
|
||||||
version_by_spec: "[3.8,4.0)"
|
version_by_spec: "[3.8,4.0)"
|
||||||
dest: /tmp/
|
dest: /tmp/
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
|
|
Loading…
Reference in New Issue