mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
[ab]*.py: normalize docs (#9421)
* [ab]*.py: normalize docs * Update plugins/modules/atomic_image.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
43599c6850
commit
2a2a9661d9
36 changed files with 1931 additions and 2013 deletions
|
@ -9,15 +9,13 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: aerospike_migrations
|
module: aerospike_migrations
|
||||||
short_description: Check or wait for migrations between nodes
|
short_description: Check or wait for migrations between nodes
|
||||||
description:
|
description:
|
||||||
- This can be used to check for migrations in a cluster.
|
- This can be used to check for migrations in a cluster. This makes it easy to do a rolling upgrade/update on Aerospike
|
||||||
This makes it easy to do a rolling upgrade/update on Aerospike nodes.
|
nodes.
|
||||||
- If waiting for migrations is not desired, simply just poll until
|
- If waiting for migrations is not desired, simply just poll until port 3000 if available or C(asinfo -v status) returns ok.
|
||||||
port 3000 if available or asinfo -v status returns ok
|
|
||||||
author: "Albert Autin (@Alb0t)"
|
author: "Albert Autin (@Alb0t)"
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
@ -29,26 +27,25 @@ attributes:
|
||||||
options:
|
options:
|
||||||
host:
|
host:
|
||||||
description:
|
description:
|
||||||
- Which host do we use as seed for info connection
|
- Which host do we use as seed for info connection.
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
default: localhost
|
default: localhost
|
||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- Which port to connect to Aerospike on (service port)
|
- Which port to connect to Aerospike on (service port).
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
default: 3000
|
default: 3000
|
||||||
connect_timeout:
|
connect_timeout:
|
||||||
description:
|
description:
|
||||||
- How long to try to connect before giving up (milliseconds)
|
- How long to try to connect before giving up (milliseconds).
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
default: 1000
|
default: 1000
|
||||||
consecutive_good_checks:
|
consecutive_good_checks:
|
||||||
description:
|
description:
|
||||||
- How many times should the cluster report "no migrations"
|
- How many times should the cluster report "no migrations" consecutively before returning OK back to ansible?
|
||||||
consecutively before returning OK back to ansible?
|
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
default: 3
|
default: 3
|
||||||
|
@ -66,53 +63,46 @@ options:
|
||||||
type: int
|
type: int
|
||||||
local_only:
|
local_only:
|
||||||
description:
|
description:
|
||||||
- Do you wish to only check for migrations on the local node
|
- Do you wish to only check for migrations on the local node before returning, or do you want all nodes in the cluster
|
||||||
before returning, or do you want all nodes in the cluster
|
|
||||||
to finish before returning?
|
to finish before returning?
|
||||||
required: true
|
required: true
|
||||||
type: bool
|
type: bool
|
||||||
min_cluster_size:
|
min_cluster_size:
|
||||||
description:
|
description:
|
||||||
- Check will return bad until cluster size is met
|
- Check will return bad until cluster size is met or until tries is exhausted.
|
||||||
or until tries is exhausted
|
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
default: 1
|
default: 1
|
||||||
fail_on_cluster_change:
|
fail_on_cluster_change:
|
||||||
description:
|
description:
|
||||||
- Fail if the cluster key changes
|
- Fail if the cluster key changes if something else is changing the cluster, we may want to fail.
|
||||||
if something else is changing the cluster, we may want to fail
|
|
||||||
required: false
|
required: false
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
migrate_tx_key:
|
migrate_tx_key:
|
||||||
description:
|
description:
|
||||||
- The metric key used to determine if we have tx migrations
|
- The metric key used to determine if we have tx migrations remaining. Changeable due to backwards compatibility.
|
||||||
remaining. Changeable due to backwards compatibility.
|
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
default: migrate_tx_partitions_remaining
|
default: migrate_tx_partitions_remaining
|
||||||
migrate_rx_key:
|
migrate_rx_key:
|
||||||
description:
|
description:
|
||||||
- The metric key used to determine if we have rx migrations
|
- The metric key used to determine if we have rx migrations remaining. Changeable due to backwards compatibility.
|
||||||
remaining. Changeable due to backwards compatibility.
|
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
default: migrate_rx_partitions_remaining
|
default: migrate_rx_partitions_remaining
|
||||||
target_cluster_size:
|
target_cluster_size:
|
||||||
description:
|
description:
|
||||||
- When all aerospike builds in the cluster are greater than
|
- When all aerospike builds in the cluster are greater than version 4.3, then the C(cluster-stable) info command will
|
||||||
version 4.3, then the C(cluster-stable) info command will be used.
|
be used. Inside this command, you can optionally specify what the target cluster size is - but it is not necessary.
|
||||||
Inside this command, you can optionally specify what the target
|
You can still rely on O(min_cluster_size) if you do not want to use this option.
|
||||||
cluster size is - but it is not necessary. You can still rely on
|
- If this option is specified on a cluster that has at least one host <4.3 then it will be ignored until the min version
|
||||||
min_cluster_size if you don't want to use this option.
|
reaches 4.3.
|
||||||
- If this option is specified on a cluster that has at least 1
|
|
||||||
host <4.3 then it will be ignored until the min version reaches
|
|
||||||
4.3.
|
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
'''
|
"""
|
||||||
EXAMPLES = '''
|
|
||||||
|
EXAMPLES = r"""
|
||||||
# check for migrations on local node
|
# check for migrations on local node
|
||||||
- name: Wait for migrations on local node before proceeding
|
- name: Wait for migrations on local node before proceeding
|
||||||
community.general.aerospike_migrations:
|
community.general.aerospike_migrations:
|
||||||
|
@ -164,11 +154,11 @@ EXAMPLES = '''
|
||||||
echo foo
|
echo foo
|
||||||
- name: Reboot
|
- name: Reboot
|
||||||
ansible.builtin.reboot:
|
ansible.builtin.reboot:
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
# Returns only a success/failure result. Changed is always false.
|
# Returns only a success/failure result. Changed is always false.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: airbrake_deployment
|
module: airbrake_deployment
|
||||||
author:
|
author:
|
||||||
- "Bruce Pennypacker (@bpennypacker)"
|
- "Bruce Pennypacker (@bpennypacker)"
|
||||||
|
@ -28,7 +27,7 @@ attributes:
|
||||||
options:
|
options:
|
||||||
project_id:
|
project_id:
|
||||||
description:
|
description:
|
||||||
- Airbrake PROJECT_ID
|
- Airbrake PROJECT_ID.
|
||||||
required: true
|
required: true
|
||||||
type: str
|
type: str
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
|
@ -40,27 +39,27 @@ options:
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
environment:
|
environment:
|
||||||
description:
|
description:
|
||||||
- The airbrake environment name, typically 'production', 'staging', etc.
|
- The airbrake environment name, typically v(production), V(staging), and so on.
|
||||||
required: true
|
required: true
|
||||||
type: str
|
type: str
|
||||||
user:
|
user:
|
||||||
description:
|
description:
|
||||||
- The username of the person doing the deployment
|
- The username of the person doing the deployment.
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
repo:
|
repo:
|
||||||
description:
|
description:
|
||||||
- URL of the project repository
|
- URL of the project repository.
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
revision:
|
revision:
|
||||||
description:
|
description:
|
||||||
- A hash, number, tag, or other identifier showing what revision from version control was deployed
|
- A hash, number, tag, or other identifier showing what revision from version control was deployed.
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
version:
|
version:
|
||||||
description:
|
description:
|
||||||
- A string identifying what version was deployed
|
- A string identifying what version was deployed.
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
version_added: '1.0.0'
|
version_added: '1.0.0'
|
||||||
|
@ -72,16 +71,16 @@ options:
|
||||||
type: str
|
type: str
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If V(false), SSL certificates for the target url will not be validated. This should only be used
|
- If V(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled
|
||||||
on personally controlled sites using self-signed certificates.
|
sites using self-signed certificates.
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: bool
|
type: bool
|
||||||
|
|
||||||
requirements: []
|
requirements: []
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Notify airbrake about an app deployment
|
- name: Notify airbrake about an app deployment
|
||||||
community.general.airbrake_deployment:
|
community.general.airbrake_deployment:
|
||||||
project_id: '12345'
|
project_id: '12345'
|
||||||
|
@ -98,7 +97,7 @@ EXAMPLES = '''
|
||||||
user: ansible
|
user: ansible
|
||||||
revision: 'e54dd3a01f2c421b558ef33b5f79db936e2dcf15'
|
revision: 'e54dd3a01f2c421b558ef33b5f79db936e2dcf15'
|
||||||
version: '0.2.0'
|
version: '0.2.0'
|
||||||
'''
|
"""
|
||||||
|
|
||||||
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
|
||||||
|
|
|
@ -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"""
|
||||||
---
|
|
||||||
author:
|
author:
|
||||||
- Kairo Araujo (@kairoaraujo)
|
- Kairo Araujo (@kairoaraujo)
|
||||||
module: aix_devices
|
module: aix_devices
|
||||||
|
@ -31,7 +30,7 @@ options:
|
||||||
device:
|
device:
|
||||||
description:
|
description:
|
||||||
- The name of the device.
|
- The name of the device.
|
||||||
- V(all) is valid to rescan C(available) all devices (AIX cfgmgr command).
|
- V(all) is valid to rescan C(available) all devices (AIX C(cfgmgr) command).
|
||||||
type: str
|
type: str
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
|
@ -52,9 +51,9 @@ options:
|
||||||
type: str
|
type: str
|
||||||
choices: [available, defined, removed]
|
choices: [available, defined, removed]
|
||||||
default: available
|
default: available
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Scan new devices
|
- name: Scan new devices
|
||||||
community.general.aix_devices:
|
community.general.aix_devices:
|
||||||
device: all
|
device: all
|
||||||
|
@ -126,9 +125,9 @@ EXAMPLES = r'''
|
||||||
attributes:
|
attributes:
|
||||||
alias4: 10.0.0.100,255.255.255.0
|
alias4: 10.0.0.100,255.255.255.0
|
||||||
state: available
|
state: available
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r''' # '''
|
RETURN = r""" # """
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,13 @@ from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
author:
|
author:
|
||||||
- Kairo Araujo (@kairoaraujo)
|
- Kairo Araujo (@kairoaraujo)
|
||||||
module: aix_filesystem
|
module: aix_filesystem
|
||||||
short_description: Configure LVM and NFS file systems for AIX
|
short_description: Configure LVM and NFS file systems for AIX
|
||||||
description:
|
description:
|
||||||
- This module creates, removes, mount and unmount LVM and NFS file system for
|
- This module creates, removes, mount and unmount LVM and NFS file system for AIX using C(/etc/filesystems).
|
||||||
AIX using C(/etc/filesystems).
|
|
||||||
- For LVM file systems is possible to resize a file system.
|
- For LVM file systems is possible to resize a file system.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
@ -84,9 +82,8 @@ options:
|
||||||
description:
|
description:
|
||||||
- Specifies the file system size.
|
- Specifies the file system size.
|
||||||
- For already V(present) it will be resized.
|
- For already V(present) it will be resized.
|
||||||
- 512-byte blocks, Megabytes or Gigabytes. If the value has M specified
|
- 512-byte blocks, Megabytes or Gigabytes. If the value has M specified it will be in Megabytes. If the value has G
|
||||||
it will be in Megabytes. If the value has G specified it will be in
|
specified it will be in Gigabytes.
|
||||||
Gigabytes.
|
|
||||||
- If no M or G the value will be 512-byte blocks.
|
- If no M or G the value will be 512-byte blocks.
|
||||||
- If "+" is specified in begin of value, the value will be added.
|
- If "+" is specified in begin of value, the value will be added.
|
||||||
- If "-" is specified in begin of value, the value will be removed.
|
- If "-" is specified in begin of value, the value will be removed.
|
||||||
|
@ -109,9 +106,9 @@ options:
|
||||||
type: str
|
type: str
|
||||||
notes:
|
notes:
|
||||||
- For more O(attributes), please check "crfs" AIX manual.
|
- For more O(attributes), please check "crfs" AIX manual.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Create filesystem in a previously defined logical volume.
|
- name: Create filesystem in a previously defined logical volume.
|
||||||
community.general.aix_filesystem:
|
community.general.aix_filesystem:
|
||||||
device: testlv
|
device: testlv
|
||||||
|
@ -166,9 +163,9 @@ EXAMPLES = r'''
|
||||||
filesystem: /newfs
|
filesystem: /newfs
|
||||||
rm_mount_point: true
|
rm_mount_point: true
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
changed:
|
changed:
|
||||||
description: Return changed for aix_filesystems actions as true or false.
|
description: Return changed for aix_filesystems actions as true or false.
|
||||||
returned: always
|
returned: always
|
||||||
|
@ -177,7 +174,7 @@ msg:
|
||||||
description: Return message regarding the action.
|
description: Return message regarding the action.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._mount import ismount
|
from ansible_collections.community.general.plugins.module_utils._mount import ismount
|
||||||
|
|
|
@ -8,14 +8,13 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
author:
|
author:
|
||||||
- Joris Weijters (@molekuul)
|
- Joris Weijters (@molekuul)
|
||||||
module: aix_inittab
|
module: aix_inittab
|
||||||
short_description: Manages the inittab on AIX
|
short_description: Manages the C(inittab) on AIX
|
||||||
description:
|
description:
|
||||||
- Manages the inittab on AIX.
|
- Manages the C(inittab) on AIX.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -26,7 +25,7 @@ attributes:
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the inittab entry.
|
- Name of the C(inittab) entry.
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
aliases: [service]
|
aliases: [service]
|
||||||
|
@ -73,9 +72,9 @@ notes:
|
||||||
- Tested on AIX 7.1.
|
- Tested on AIX 7.1.
|
||||||
requirements:
|
requirements:
|
||||||
- itertools
|
- itertools
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
# Add service startmyservice to the inittab, directly after service existingservice.
|
# Add service startmyservice to the inittab, directly after service existingservice.
|
||||||
- name: Add startmyservice to inittab
|
- name: Add startmyservice to inittab
|
||||||
community.general.aix_inittab:
|
community.general.aix_inittab:
|
||||||
|
@ -105,25 +104,25 @@ EXAMPLES = '''
|
||||||
command: echo hello
|
command: echo hello
|
||||||
state: absent
|
state: absent
|
||||||
become: true
|
become: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
name:
|
name:
|
||||||
description: Name of the adjusted inittab entry
|
description: Name of the adjusted C(inittab) entry.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: startmyservice
|
sample: startmyservice
|
||||||
msg:
|
msg:
|
||||||
description: Action done with the inittab entry
|
description: Action done with the C(inittab) entry.
|
||||||
returned: changed
|
returned: changed
|
||||||
type: str
|
type: str
|
||||||
sample: changed inittab entry startmyservice
|
sample: changed inittab entry startmyservice
|
||||||
changed:
|
changed:
|
||||||
description: Whether the inittab changed or not
|
description: Whether the C(inittab) changed or not.
|
||||||
returned: always
|
returned: always
|
||||||
type: bool
|
type: bool
|
||||||
sample: true
|
sample: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
# Import necessary libraries
|
# Import necessary libraries
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -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"""
|
||||||
---
|
|
||||||
author:
|
author:
|
||||||
- Kairo Araujo (@kairoaraujo)
|
- Kairo Araujo (@kairoaraujo)
|
||||||
module: aix_lvg
|
module: aix_lvg
|
||||||
|
@ -60,9 +59,9 @@ options:
|
||||||
notes:
|
notes:
|
||||||
- AIX will permit remove VG only if all LV/Filesystems are not busy.
|
- AIX will permit remove VG only if all LV/Filesystems are not busy.
|
||||||
- Module does not modify PP size for already present volume group.
|
- Module does not modify PP size for already present volume group.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Create a volume group datavg
|
- name: Create a volume group datavg
|
||||||
community.general.aix_lvg:
|
community.general.aix_lvg:
|
||||||
vg: datavg
|
vg: datavg
|
||||||
|
@ -86,9 +85,9 @@ EXAMPLES = r'''
|
||||||
vg: rootvg
|
vg: rootvg
|
||||||
pvs: hdisk1
|
pvs: hdisk1
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r''' # '''
|
RETURN = r""" # """
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
author:
|
author:
|
||||||
- Alain Dejoux (@adejoux)
|
- Alain Dejoux (@adejoux)
|
||||||
module: aix_lvol
|
module: aix_lvol
|
||||||
|
@ -60,8 +59,8 @@ options:
|
||||||
default: maximum
|
default: maximum
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Control if the logical volume exists. If V(present) and the
|
- Control if the logical volume exists. If V(present) and the volume does not already exist then the O(size) option
|
||||||
volume does not already exist then the O(size) option is required.
|
is required.
|
||||||
type: str
|
type: str
|
||||||
choices: [absent, present]
|
choices: [absent, present]
|
||||||
default: present
|
default: present
|
||||||
|
@ -76,9 +75,9 @@ options:
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
default: []
|
default: []
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Create a logical volume of 512M
|
- name: Create a logical volume of 512M
|
||||||
community.general.aix_lvol:
|
community.general.aix_lvol:
|
||||||
vg: testvg
|
vg: testvg
|
||||||
|
@ -124,15 +123,15 @@ EXAMPLES = r'''
|
||||||
vg: testvg
|
vg: testvg
|
||||||
lv: testlv
|
lv: testlv
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
msg:
|
msg:
|
||||||
type: str
|
type: str
|
||||||
description: A friendly message describing the task result.
|
description: A friendly message describing the task result.
|
||||||
returned: always
|
returned: always
|
||||||
sample: Logical volume testlv created.
|
sample: Logical volume testlv created.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
|
@ -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"""
|
||||||
---
|
|
||||||
module: alerta_customer
|
module: alerta_customer
|
||||||
short_description: Manage customers in Alerta
|
short_description: Manage customers in Alerta
|
||||||
version_added: 4.8.0
|
version_added: 4.8.0
|
||||||
|
@ -18,7 +17,7 @@ description:
|
||||||
author: Christian Wollinger (@cwollinger)
|
author: Christian Wollinger (@cwollinger)
|
||||||
seealso:
|
seealso:
|
||||||
- name: API documentation
|
- name: API documentation
|
||||||
description: Documentation for Alerta API
|
description: Documentation for Alerta API.
|
||||||
link: https://docs.alerta.io/api/reference.html#customers
|
link: https://docs.alerta.io/api/reference.html#customers
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
@ -62,9 +61,9 @@ options:
|
||||||
type: str
|
type: str
|
||||||
choices: [absent, present]
|
choices: [absent, present]
|
||||||
default: present
|
default: present
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = r"""
|
||||||
- name: Create customer
|
- name: Create customer
|
||||||
community.general.alerta_customer:
|
community.general.alerta_customer:
|
||||||
alerta_url: https://alerta.example.com
|
alerta_url: https://alerta.example.com
|
||||||
|
@ -83,7 +82,7 @@ EXAMPLES = """
|
||||||
state: absent
|
state: absent
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RETURN = """
|
RETURN = r"""
|
||||||
msg:
|
msg:
|
||||||
description:
|
description:
|
||||||
- Success or failure message.
|
- Success or failure message.
|
||||||
|
|
|
@ -24,12 +24,12 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: ali_instance
|
module: ali_instance
|
||||||
short_description: Create, Start, Stop, Restart or Terminate an Instance in ECS; Add or Remove Instance to/from a Security Group
|
short_description: Create, Start, Stop, Restart or Terminate an Instance in ECS; Add or Remove Instance to/from a Security
|
||||||
|
Group
|
||||||
description:
|
description:
|
||||||
- Create, start, stop, restart, modify or terminate ecs instances.
|
- Create, start, stop, restart, modify or terminate ECS instances.
|
||||||
- Add or remove ecs instances to/from security group.
|
- Add or remove ecs instances to/from security group.
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
|
@ -45,8 +45,8 @@ options:
|
||||||
type: str
|
type: str
|
||||||
availability_zone:
|
availability_zone:
|
||||||
description:
|
description:
|
||||||
- Aliyun availability zone ID in which to launch the instance.
|
- Aliyun availability zone ID in which to launch the instance. If it is not specified, it will be allocated by system
|
||||||
If it is not specified, it will be allocated by system automatically.
|
automatically.
|
||||||
aliases: ['alicloud_zone', 'zone_id']
|
aliases: ['alicloud_zone', 'zone_id']
|
||||||
type: str
|
type: str
|
||||||
image_id:
|
image_id:
|
||||||
|
@ -72,14 +72,13 @@ options:
|
||||||
type: str
|
type: str
|
||||||
instance_name:
|
instance_name:
|
||||||
description:
|
description:
|
||||||
- The name of ECS instance, which is a string of 2 to 128 Chinese or English characters. It must begin with an
|
- The name of ECS instance, which is a string of 2 to 128 Chinese or English characters. It must begin with an uppercase/lowercase
|
||||||
uppercase/lowercase letter or a Chinese character and can contain numerals, ".", "_" or "-".
|
letter or a Chinese character and can contain numerals, V(.), V(_) or V(-). It cannot begin with V(http://) or V(https://).
|
||||||
It cannot begin with http:// or https://.
|
|
||||||
aliases: ['name']
|
aliases: ['name']
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
description:
|
description:
|
||||||
- The description of ECS instance, which is a string of 2 to 256 characters. It cannot begin with http:// or https://.
|
- The description of ECS instance, which is a string of 2 to 256 characters. It cannot begin with V(http://) or V(https://).
|
||||||
type: str
|
type: str
|
||||||
internet_charge_type:
|
internet_charge_type:
|
||||||
description:
|
description:
|
||||||
|
@ -94,8 +93,8 @@ options:
|
||||||
type: int
|
type: int
|
||||||
max_bandwidth_out:
|
max_bandwidth_out:
|
||||||
description:
|
description:
|
||||||
- Maximum outgoing bandwidth to the public network, measured in Mbps (Megabits per second).
|
- Maximum outgoing bandwidth to the public network, measured in Mbps (Megabits per second). Required when O(allocate_public_ip=true).
|
||||||
Required when O(allocate_public_ip=true). Ignored when O(allocate_public_ip=false).
|
Ignored when O(allocate_public_ip=false).
|
||||||
default: 0
|
default: 0
|
||||||
type: int
|
type: int
|
||||||
host_name:
|
host_name:
|
||||||
|
@ -104,8 +103,7 @@ options:
|
||||||
type: str
|
type: str
|
||||||
unique_suffix:
|
unique_suffix:
|
||||||
description:
|
description:
|
||||||
- Specifies whether to add sequential suffixes to the host_name.
|
- Specifies whether to add sequential suffixes to the host_name. The sequential suffix ranges from 001 to 999.
|
||||||
The sequential suffix ranges from 001 to 999.
|
|
||||||
default: false
|
default: false
|
||||||
type: bool
|
type: bool
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
|
@ -121,7 +119,7 @@ options:
|
||||||
type: str
|
type: str
|
||||||
system_disk_size:
|
system_disk_size:
|
||||||
description:
|
description:
|
||||||
- Size of the system disk, in GB. The valid values are 40~500.
|
- Size of the system disk, in GB. The valid values are V(40)~V(500).
|
||||||
default: 40
|
default: 40
|
||||||
type: int
|
type: int
|
||||||
system_disk_name:
|
system_disk_name:
|
||||||
|
@ -134,20 +132,19 @@ options:
|
||||||
type: str
|
type: str
|
||||||
count:
|
count:
|
||||||
description:
|
description:
|
||||||
- The number of the new instance. An integer value which indicates how many instances that match O(count_tag)
|
- The number of the new instance. An integer value which indicates how many instances that match O(count_tag) should
|
||||||
should be running. Instances are either created or terminated based on this value.
|
be running. Instances are either created or terminated based on this value.
|
||||||
default: 1
|
default: 1
|
||||||
type: int
|
type: int
|
||||||
count_tag:
|
count_tag:
|
||||||
description:
|
description:
|
||||||
- O(count) determines how many instances based on a specific tag criteria should be present.
|
- O(count) determines how many instances based on a specific tag criteria should be present. This can be expressed in
|
||||||
This can be expressed in multiple ways and is shown in the EXAMPLES section.
|
multiple ways and is shown in the EXAMPLES section. The specified count_tag must already exist or be passed in as
|
||||||
The specified count_tag must already exist or be passed in as the O(tags) option.
|
the O(tags) option. If it is not specified, it will be replaced by O(instance_name).
|
||||||
If it is not specified, it will be replaced by O(instance_name).
|
|
||||||
type: str
|
type: str
|
||||||
allocate_public_ip:
|
allocate_public_ip:
|
||||||
description:
|
description:
|
||||||
- Whether allocate a public ip for the new instance.
|
- Whether allocate a public IP for the new instance.
|
||||||
default: false
|
default: false
|
||||||
aliases: ['assign_public_ip']
|
aliases: ['assign_public_ip']
|
||||||
type: bool
|
type: bool
|
||||||
|
@ -160,7 +157,7 @@ options:
|
||||||
period:
|
period:
|
||||||
description:
|
description:
|
||||||
- The charge duration of the instance, in months. Required when O(instance_charge_type=PrePaid).
|
- The charge duration of the instance, in months. Required when O(instance_charge_type=PrePaid).
|
||||||
- The valid value are [1-9, 12, 24, 36].
|
- The valid value are [V(1-9), V(12), V(24), V(36)].
|
||||||
default: 1
|
default: 1
|
||||||
type: int
|
type: int
|
||||||
auto_renew:
|
auto_renew:
|
||||||
|
@ -175,8 +172,8 @@ options:
|
||||||
type: int
|
type: int
|
||||||
instance_ids:
|
instance_ids:
|
||||||
description:
|
description:
|
||||||
- A list of instance ids. It is required when need to operate existing instances.
|
- A list of instance ids. It is required when need to operate existing instances. If it is specified, O(count) will
|
||||||
If it is specified, O(count) will lose efficacy.
|
lose efficacy.
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
force:
|
force:
|
||||||
|
@ -186,14 +183,14 @@ options:
|
||||||
type: bool
|
type: bool
|
||||||
tags:
|
tags:
|
||||||
description:
|
description:
|
||||||
- A hash/dictionaries of instance tags, to add to the new instance or for starting/stopping instance by tag. V({"key":"value"})
|
- A hash/dictionaries of instance tags, to add to the new instance or for starting/stopping instance by tag. V({"key":"value"}).
|
||||||
aliases: ["instance_tags"]
|
aliases: ["instance_tags"]
|
||||||
type: dict
|
type: dict
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
purge_tags:
|
purge_tags:
|
||||||
description:
|
description:
|
||||||
- Delete any tags not specified in the task that are on the instance.
|
- Delete any tags not specified in the task that are on the instance. If V(true), it means you have to specify all the
|
||||||
If True, it means you have to specify all the desired tags on each task affecting an instance.
|
desired tags on each task affecting an instance.
|
||||||
default: false
|
default: false
|
||||||
type: bool
|
type: bool
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
|
@ -205,8 +202,8 @@ options:
|
||||||
aliases: ['keypair']
|
aliases: ['keypair']
|
||||||
user_data:
|
user_data:
|
||||||
description:
|
description:
|
||||||
- User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance.
|
- User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It
|
||||||
It only will take effect when launching the new ECS instances.
|
only will take effect when launching the new ECS instances.
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
ram_role_name:
|
ram_role_name:
|
||||||
|
@ -216,13 +213,13 @@ options:
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
spot_price_limit:
|
spot_price_limit:
|
||||||
description:
|
description:
|
||||||
- The maximum hourly price for the preemptible instance. This parameter supports a maximum of three decimal
|
- The maximum hourly price for the preemptible instance. This parameter supports a maximum of three decimal places and
|
||||||
places and takes effect when the SpotStrategy parameter is set to SpotWithPriceLimit.
|
takes effect when the SpotStrategy parameter is set to SpotWithPriceLimit.
|
||||||
type: float
|
type: float
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
spot_strategy:
|
spot_strategy:
|
||||||
description:
|
description:
|
||||||
- The bidding mode of the pay-as-you-go instance. This parameter is valid when InstanceChargeType is set to PostPaid.
|
- The bidding mode of the pay-as-you-go instance. This parameter is valid when O(instance_charge_type=PostPaid).
|
||||||
choices: ['NoSpot', 'SpotWithPriceLimit', 'SpotAsPriceGo']
|
choices: ['NoSpot', 'SpotWithPriceLimit', 'SpotAsPriceGo']
|
||||||
default: 'NoSpot'
|
default: 'NoSpot'
|
||||||
type: str
|
type: str
|
||||||
|
@ -237,10 +234,10 @@ options:
|
||||||
dry_run:
|
dry_run:
|
||||||
description:
|
description:
|
||||||
- Specifies whether to send a dry-run request.
|
- Specifies whether to send a dry-run request.
|
||||||
- If O(dry_run=true), Only a dry-run request is sent and no instance is created. The system checks whether the
|
- If O(dry_run=true), Only a dry-run request is sent and no instance is created. The system checks whether the required
|
||||||
required parameters are set, and validates the request format, service permissions, and available ECS instances.
|
parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation
|
||||||
If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
|
fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
|
||||||
- If O(dry_run=false), A request is sent. If the validation succeeds, the instance is created.
|
- If O(dry_run=false), a request is sent. If the validation succeeds, the instance is created.
|
||||||
default: false
|
default: false
|
||||||
type: bool
|
type: bool
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
|
@ -258,9 +255,9 @@ requirements:
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.alicloud
|
- community.general.alicloud
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
# basic provisioning example vpc network
|
# basic provisioning example vpc network
|
||||||
- name: Basic provisioning example
|
- name: Basic provisioning example
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
|
@ -348,11 +345,11 @@ EXAMPLES = '''
|
||||||
alicloud_region: '{{ alicloud_region }}'
|
alicloud_region: '{{ alicloud_region }}'
|
||||||
instance_ids: '{{ instance_ids }}'
|
instance_ids: '{{ instance_ids }}'
|
||||||
security_groups: '{{ security_groups }}'
|
security_groups: '{{ security_groups }}'
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
instances:
|
instances:
|
||||||
description: List of ECS instances
|
description: List of ECS instances.
|
||||||
returned: always
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
|
@ -367,7 +364,7 @@ instances:
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
device_name:
|
device_name:
|
||||||
description: The device name exposed to the instance (for example, /dev/xvda).
|
description: The device name exposed to the instance.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: /dev/xvda
|
sample: /dev/xvda
|
||||||
|
@ -552,7 +549,7 @@ instances:
|
||||||
type: str
|
type: str
|
||||||
sample: 10.0.0.1
|
sample: 10.0.0.1
|
||||||
public_ip_address:
|
public_ip_address:
|
||||||
description: The public IPv4 address assigned to the instance or eip address
|
description: The public IPv4 address assigned to the instance or eip address.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: 43.0.0.1
|
sample: 43.0.0.1
|
||||||
|
@ -615,11 +612,11 @@ instances:
|
||||||
type: str
|
type: str
|
||||||
sample: NoSpot
|
sample: NoSpot
|
||||||
ids:
|
ids:
|
||||||
description: List of ECS instance IDs
|
description: List of ECS instance IDs.
|
||||||
returned: always
|
returned: always
|
||||||
type: list
|
type: list
|
||||||
sample: [i-12345er, i-3245fs]
|
sample: [i-12345er, i-3245fs]
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -24,14 +24,11 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: ali_instance_info
|
module: ali_instance_info
|
||||||
short_description: Gather information on instances of Alibaba Cloud ECS
|
short_description: Gather information on instances of Alibaba Cloud ECS
|
||||||
description:
|
description:
|
||||||
- This module fetches data from the Open API in Alicloud.
|
- This module fetches data from the Open API in Alicloud. The module must be called from within the ECS instance itself.
|
||||||
The module must be called from within the ECS instance itself.
|
|
||||||
|
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
version_added: 3.3.0
|
version_added: 3.3.0
|
||||||
|
@ -40,21 +37,21 @@ attributes:
|
||||||
options:
|
options:
|
||||||
name_prefix:
|
name_prefix:
|
||||||
description:
|
description:
|
||||||
- Use a instance name prefix to filter ecs instances.
|
- Use a instance name prefix to filter ECS instances.
|
||||||
type: str
|
type: str
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
tags:
|
tags:
|
||||||
description:
|
description:
|
||||||
- A hash/dictionaries of instance tags. C({"key":"value"})
|
- A hash/dictionaries of instance tags. C({"key":"value"}).
|
||||||
aliases: ["instance_tags"]
|
aliases: ["instance_tags"]
|
||||||
type: dict
|
type: dict
|
||||||
filters:
|
filters:
|
||||||
description:
|
description:
|
||||||
- A dict of filters to apply. Each dict item consists of a filter key and a filter value. The filter keys can be
|
- A dict of filters to apply. Each dict item consists of a filter key and a filter value. The filter keys can be all
|
||||||
all of request parameters. See U(https://www.alibabacloud.com/help/doc-detail/25506.htm) for parameter details.
|
of request parameters. See U(https://www.alibabacloud.com/help/doc-detail/25506.htm) for parameter details. Filter
|
||||||
Filter keys can be same as request parameter name or be lower case and use underscore (V("_")) or dash (V("-")) to
|
keys can be same as request parameter name or be lower case and use underscore (V("_")) or dash (V("-")) to connect
|
||||||
connect different words in one parameter. C(InstanceIds) should be a list.
|
different words in one parameter. C(InstanceIds) should be a list. C(Tag.n.Key) and C(Tag.n.Value) should be a dict
|
||||||
C(Tag.n.Key) and C(Tag.n.Value) should be a dict and using O(tags) instead.
|
and using O(tags) instead.
|
||||||
type: dict
|
type: dict
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
author:
|
author:
|
||||||
|
@ -66,9 +63,9 @@ extends_documentation_fragment:
|
||||||
- community.general.alicloud
|
- community.general.alicloud
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
# Fetch instances details according to setting different filters
|
# Fetch instances details according to setting different filters
|
||||||
|
|
||||||
- name: Find all instances in the specified region
|
- name: Find all instances in the specified region
|
||||||
|
@ -91,11 +88,11 @@ EXAMPLES = '''
|
||||||
community.general.ali_instance_info:
|
community.general.ali_instance_info:
|
||||||
tags:
|
tags:
|
||||||
Test: "add"
|
Test: "add"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
instances:
|
instances:
|
||||||
description: List of ECS instances
|
description: List of ECS instances.
|
||||||
returned: always
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
|
@ -295,7 +292,7 @@ instances:
|
||||||
type: str
|
type: str
|
||||||
sample: 10.0.0.1
|
sample: 10.0.0.1
|
||||||
public_ip_address:
|
public_ip_address:
|
||||||
description: The public IPv4 address assigned to the instance or eip address
|
description: The public IPv4 address assigned to the instance or EIP address.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: 43.0.0.1
|
sample: 43.0.0.1
|
||||||
|
@ -341,11 +338,11 @@ instances:
|
||||||
type: str
|
type: str
|
||||||
sample: vpc-0011223344
|
sample: vpc-0011223344
|
||||||
ids:
|
ids:
|
||||||
description: List of ECS instance IDs
|
description: List of ECS instance IDs.
|
||||||
returned: always
|
returned: always
|
||||||
type: list
|
type: list
|
||||||
sample: [i-12345er, i-3245fs]
|
sample: [i-12345er, i-3245fs]
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||||
from ansible_collections.community.general.plugins.module_utils.alicloud_ecs import (
|
from ansible_collections.community.general.plugins.module_utils.alicloud_ecs import (
|
||||||
|
|
|
@ -11,13 +11,12 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: alternatives
|
module: alternatives
|
||||||
short_description: Manages alternative programs for common commands
|
short_description: Manages alternative programs for common commands
|
||||||
description:
|
description:
|
||||||
- Manages symbolic links using the 'update-alternatives' tool.
|
- Manages symbolic links using the C(update-alternatives) tool.
|
||||||
- Useful when multiple programs are installed but provide similar functionality (e.g. different editors).
|
- Useful when multiple programs are installed but provide similar functionality (for example, different editors).
|
||||||
author:
|
author:
|
||||||
- Marius Rieder (@jiuka)
|
- Marius Rieder (@jiuka)
|
||||||
- David Wittman (@DavidWittman)
|
- David Wittman (@DavidWittman)
|
||||||
|
@ -47,8 +46,8 @@ options:
|
||||||
link:
|
link:
|
||||||
description:
|
description:
|
||||||
- The path to the symbolic link that should point to the real executable.
|
- The path to the symbolic link that should point to the real executable.
|
||||||
- This option is always required on RHEL-based distributions. On Debian-based distributions this option is
|
- This option is always required on RHEL-based distributions. On Debian-based distributions this option is required
|
||||||
required when the alternative O(name) is unknown to the system.
|
when the alternative O(name) is unknown to the system.
|
||||||
type: path
|
type: path
|
||||||
priority:
|
priority:
|
||||||
description:
|
description:
|
||||||
|
@ -56,12 +55,12 @@ options:
|
||||||
type: int
|
type: int
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- V(present) - install the alternative (if not already installed), but do
|
- V(present) - install the alternative (if not already installed), but do not set it as the currently selected alternative
|
||||||
not set it as the currently selected alternative for the group.
|
for the group.
|
||||||
- V(selected) - install the alternative (if not already installed), and
|
- V(selected) - install the alternative (if not already installed), and set it as the currently selected alternative
|
||||||
set it as the currently selected alternative for the group.
|
for the group.
|
||||||
- V(auto) - install the alternative (if not already installed), and
|
- V(auto) - install the alternative (if not already installed), and set the group to auto mode. Added in community.general
|
||||||
set the group to auto mode. Added in community.general 5.1.0.
|
5.1.0.
|
||||||
- V(absent) - removes the alternative. Added in community.general 5.1.0.
|
- V(absent) - removes the alternative. Added in community.general 5.1.0.
|
||||||
choices: [present, selected, auto, absent]
|
choices: [present, selected, auto, absent]
|
||||||
default: selected
|
default: selected
|
||||||
|
@ -71,8 +70,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- A list of subcommands.
|
- A list of subcommands.
|
||||||
- Each subcommand needs a name, a link and a path parameter.
|
- Each subcommand needs a name, a link and a path parameter.
|
||||||
- Subcommands are also named 'slaves' or 'followers', depending on the version
|
- Subcommands are also named C(slaves) or C(followers), depending on the version of C(alternatives).
|
||||||
of alternatives.
|
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
aliases: ['slaves']
|
aliases: ['slaves']
|
||||||
|
@ -94,9 +92,9 @@ options:
|
||||||
required: true
|
required: true
|
||||||
version_added: 5.1.0
|
version_added: 5.1.0
|
||||||
requirements: [update-alternatives]
|
requirements: [update-alternatives]
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Correct java version selected
|
- name: Correct java version selected
|
||||||
community.general.alternatives:
|
community.general.alternatives:
|
||||||
name: java
|
name: java
|
||||||
|
@ -143,7 +141,7 @@ EXAMPLES = r'''
|
||||||
- name: keytool
|
- name: keytool
|
||||||
link: /usr/bin/keytool
|
link: /usr/bin/keytool
|
||||||
path: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/keytool
|
path: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/keytool
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: android_sdk
|
module: android_sdk
|
||||||
short_description: Manages Android SDK packages
|
short_description: Manages Android SDK packages
|
||||||
description:
|
description:
|
||||||
|
@ -29,8 +28,8 @@ version_added: 10.2.0
|
||||||
options:
|
options:
|
||||||
accept_licenses:
|
accept_licenses:
|
||||||
description:
|
description:
|
||||||
- If this is set to B(true), the module will try to accept license prompts generated by C(sdkmanager) during
|
- If this is set to V(true), the module will try to accept license prompts generated by C(sdkmanager) during package
|
||||||
package installation. Otherwise, every license prompt will be rejected.
|
installation. Otherwise, every license prompt will be rejected.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
name:
|
name:
|
||||||
|
@ -50,8 +49,8 @@ options:
|
||||||
type: str
|
type: str
|
||||||
sdk_root:
|
sdk_root:
|
||||||
description:
|
description:
|
||||||
- Provides path for an alternative directory to install Android SDK packages to. By default, all packages
|
- Provides path for an alternative directory to install Android SDK packages to. By default, all packages are installed
|
||||||
are installed to the directory where C(sdkmanager) is installed.
|
to the directory where C(sdkmanager) is installed.
|
||||||
type: path
|
type: path
|
||||||
channel:
|
channel:
|
||||||
description:
|
description:
|
||||||
|
@ -63,27 +62,25 @@ requirements:
|
||||||
- C(java) >= 17
|
- C(java) >= 17
|
||||||
- C(sdkmanager) Command line tool for installing Android SDK packages.
|
- C(sdkmanager) Command line tool for installing Android SDK packages.
|
||||||
notes:
|
notes:
|
||||||
- For some of the packages installed by C(sdkmanager) is it necessary to accept licenses. Usually it is done through
|
- For some of the packages installed by C(sdkmanager) is it necessary to accept licenses. Usually it is done through command
|
||||||
command line prompt in a form of a Y/N question when a licensed package is requested to be installed. If there are
|
line prompt in a form of a Y/N question when a licensed package is requested to be installed. If there are several packages
|
||||||
several packages requested for installation and at least two of them belong to different licenses, the C(sdkmanager)
|
requested for installation and at least two of them belong to different licenses, the C(sdkmanager) tool will prompt for
|
||||||
tool will prompt for these licenses in a loop.
|
these licenses in a loop. In order to install packages, the module must be able to answer these license prompts. Currently,
|
||||||
In order to install packages, the module must be able to answer these license prompts. Currently, it is only
|
it is only possible to answer one license prompt at a time, meaning that instead of installing multiple packages as a
|
||||||
possible to answer one license prompt at a time, meaning that instead of installing multiple packages as a single
|
single invocation of the C(sdkmanager --install) command, it will be done by executing the command independently for each
|
||||||
invocation of the C(sdkmanager --install) command, it will be done by executing the command independently for each
|
package. This makes sure that at most only one license prompt will need to be answered. At the time of writing this module,
|
||||||
package. This makes sure that at most only one license prompt will need to be answered.
|
a C(sdkmanager)'s package may belong to at most one license type that needs to be accepted. However, if this changes
|
||||||
At the time of writing this module, a C(sdkmanager)'s package may belong to at most one license type that needs to
|
in the future, the module may hang as there might be more prompts generated by the C(sdkmanager) tool which the module
|
||||||
be accepted. However, if this is changes in the future, the module may hang as there might be more prompts generated
|
will not be able to answer. If this becomes the case, file an issue and in the meantime, consider accepting all the licenses
|
||||||
by the C(sdkmanager) tool which the module will not be able to answer. If this is the case, file an issue and in the
|
in advance, as it is described in the C(sdkmanager) L(documentation,https://developer.android.com/tools/sdkmanager#accept-licenses),
|
||||||
meantime, consider accepting all the licenses in advance, as it is described in the C(sdkmanager)
|
for instance, using the M(ansible.builtin.command) module.
|
||||||
L(documentation,https://developer.android.com/tools/sdkmanager#accept-licenses), for instance, using the
|
|
||||||
M(ansible.builtin.command) module.
|
|
||||||
seealso:
|
seealso:
|
||||||
- name: sdkmanager tool documentation
|
- name: sdkmanager tool documentation
|
||||||
description: Detailed information of how to install and use sdkmanager command line tool.
|
description: Detailed information of how to install and use sdkmanager command line tool.
|
||||||
link: https://developer.android.com/tools/sdkmanager
|
link: https://developer.android.com/tools/sdkmanager
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Install build-tools;34.0.0
|
- name: Install build-tools;34.0.0
|
||||||
community.general.android_sdk:
|
community.general.android_sdk:
|
||||||
name: build-tools;34.0.0
|
name: build-tools;34.0.0
|
||||||
|
@ -122,21 +119,21 @@ EXAMPLES = r'''
|
||||||
accept_licenses: true
|
accept_licenses: true
|
||||||
state: present
|
state: present
|
||||||
channel: canary
|
channel: canary
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
installed:
|
installed:
|
||||||
description: a list of packages that have been installed
|
description: A list of packages that have been installed.
|
||||||
returned: when packages have changed
|
returned: when packages have changed
|
||||||
type: list
|
type: list
|
||||||
sample: ['build-tools;34.0.0', 'platform-tools']
|
sample: ['build-tools;34.0.0', 'platform-tools']
|
||||||
|
|
||||||
removed:
|
removed:
|
||||||
description: a list of packages that have been removed
|
description: A list of packages that have been removed.
|
||||||
returned: when packages have changed
|
returned: when packages have changed
|
||||||
type: list
|
type: list
|
||||||
sample: ['build-tools;34.0.0', 'platform-tools']
|
sample: ['build-tools;34.0.0', 'platform-tools']
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.mh.module_helper import StateModuleHelper
|
from ansible_collections.community.general.plugins.module_utils.mh.module_helper import StateModuleHelper
|
||||||
from ansible_collections.community.general.plugins.module_utils.android_sdkmanager import Package, AndroidSdkManager
|
from ansible_collections.community.general.plugins.module_utils.android_sdkmanager import Package, AndroidSdkManager
|
||||||
|
|
|
@ -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"""
|
||||||
---
|
|
||||||
module: ansible_galaxy_install
|
module: ansible_galaxy_install
|
||||||
author:
|
author:
|
||||||
- "Alexei Znamensky (@russoz)"
|
- "Alexei Znamensky (@russoz)"
|
||||||
|
@ -19,10 +18,8 @@ description:
|
||||||
- This module allows the installation of Ansible collections or roles using C(ansible-galaxy).
|
- This module allows the installation of Ansible collections or roles using C(ansible-galaxy).
|
||||||
notes:
|
notes:
|
||||||
- Support for B(Ansible 2.9/2.10) was removed in community.general 8.0.0.
|
- Support for B(Ansible 2.9/2.10) was removed in community.general 8.0.0.
|
||||||
- >
|
- The module will try and run using the C(C.UTF-8) locale. If that fails, it will try C(en_US.UTF-8). If that one also fails,
|
||||||
The module will try and run using the C(C.UTF-8) locale.
|
the module will fail.
|
||||||
If that fails, it will try C(en_US.UTF-8).
|
|
||||||
If that one also fails, the module will fail.
|
|
||||||
seealso:
|
seealso:
|
||||||
- name: C(ansible-galaxy) command manual page
|
- name: C(ansible-galaxy) command manual page
|
||||||
description: Manual page for the command.
|
description: Manual page for the command.
|
||||||
|
@ -40,12 +37,10 @@ attributes:
|
||||||
options:
|
options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- >
|
- If O(state=present) then the collection or role will be installed. Note that the collections and roles are not updated
|
||||||
If O(state=present) then the collection or role will be installed.
|
with this option.
|
||||||
Note that the collections and roles are not updated with this option.
|
- Currently the O(state=latest) is ignored unless O(type=collection), and it will ensure the collection is installed
|
||||||
- >
|
and updated to the latest available version.
|
||||||
Currently the O(state=latest) is ignored unless O(type=collection), and it will
|
|
||||||
ensure the collection is installed and updated to the latest available version.
|
|
||||||
- Please note that O(force=true) can be used to perform upgrade regardless of O(type).
|
- Please note that O(force=true) can be used to perform upgrade regardless of O(type).
|
||||||
type: str
|
type: str
|
||||||
choices: [present, latest]
|
choices: [present, latest]
|
||||||
|
@ -55,16 +50,16 @@ options:
|
||||||
description:
|
description:
|
||||||
- The type of installation performed by C(ansible-galaxy).
|
- The type of installation performed by C(ansible-galaxy).
|
||||||
- If O(type=both), then O(requirements_file) must be passed and it may contain both roles and collections.
|
- If O(type=both), then O(requirements_file) must be passed and it may contain both roles and collections.
|
||||||
- "Note however that the opposite is not true: if using a O(requirements_file), then O(type) can be any of the three choices."
|
- 'Note however that the opposite is not true: if using a O(requirements_file), then O(type) can be any of the three
|
||||||
|
choices.'
|
||||||
type: str
|
type: str
|
||||||
choices: [collection, role, both]
|
choices: [collection, role, both]
|
||||||
required: true
|
required: true
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the collection or role being installed.
|
- Name of the collection or role being installed.
|
||||||
- >
|
- Versions can be specified with C(ansible-galaxy) usual formats. For example, the collection V(community.docker:1.6.1)
|
||||||
Versions can be specified with C(ansible-galaxy) usual formats.
|
or the role V(ansistrano.deploy,3.8.0).
|
||||||
For example, the collection V(community.docker:1.6.1) or the role V(ansistrano.deploy,3.8.0).
|
|
||||||
- O(name) and O(requirements_file) are mutually exclusive.
|
- O(name) and O(requirements_file) are mutually exclusive.
|
||||||
type: str
|
type: str
|
||||||
requirements_file:
|
requirements_file:
|
||||||
|
@ -76,9 +71,8 @@ options:
|
||||||
dest:
|
dest:
|
||||||
description:
|
description:
|
||||||
- The path to the directory containing your collections or roles, according to the value of O(type).
|
- The path to the directory containing your collections or roles, according to the value of O(type).
|
||||||
- >
|
- Please notice that C(ansible-galaxy) will not install collections with O(type=both), when O(requirements_file) contains
|
||||||
Please notice that C(ansible-galaxy) will not install collections with O(type=both), when O(requirements_file)
|
both roles and collections and O(dest) is specified.
|
||||||
contains both roles and collections and O(dest) is specified.
|
|
||||||
type: path
|
type: path
|
||||||
no_deps:
|
no_deps:
|
||||||
description:
|
description:
|
||||||
|
@ -95,8 +89,7 @@ options:
|
||||||
default: false
|
default: false
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = r"""
|
||||||
---
|
|
||||||
- name: Install collection community.network
|
- name: Install collection community.network
|
||||||
community.general.ansible_galaxy_install:
|
community.general.ansible_galaxy_install:
|
||||||
type: collection
|
type: collection
|
||||||
|
@ -120,8 +113,7 @@ EXAMPLES = """
|
||||||
force: true
|
force: true
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RETURN = """
|
RETURN = r"""
|
||||||
---
|
|
||||||
type:
|
type:
|
||||||
description: The value of the O(type) parameter.
|
description: The value of the O(type) parameter.
|
||||||
type: str
|
type: str
|
||||||
|
@ -166,7 +158,7 @@ installed_collections:
|
||||||
returned: always when installing collections
|
returned: always when installing collections
|
||||||
contains:
|
contains:
|
||||||
"<path>":
|
"<path>":
|
||||||
description: Collections and versions for that path
|
description: Collections and versions for that path.
|
||||||
type: dict
|
type: dict
|
||||||
sample:
|
sample:
|
||||||
/home/az/.ansible/collections/ansible_collections:
|
/home/az/.ansible/collections/ansible_collections:
|
||||||
|
|
|
@ -9,19 +9,17 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: apache2_mod_proxy
|
module: apache2_mod_proxy
|
||||||
author: Olivier Boukili (@oboukili)
|
author: Olivier Boukili (@oboukili)
|
||||||
short_description: Set and/or get members' attributes of an Apache httpd 2.4 mod_proxy balancer pool
|
short_description: Set and/or get members' attributes of an Apache httpd 2.4 mod_proxy balancer pool
|
||||||
description:
|
description:
|
||||||
- Set and/or get members' attributes of an Apache httpd 2.4 mod_proxy balancer
|
- Set and/or get members' attributes of an Apache httpd 2.4 mod_proxy balancer pool, using HTTP POST and GET requests. The
|
||||||
pool, using HTTP POST and GET requests. The httpd mod_proxy balancer-member
|
httpd mod_proxy balancer-member status page has to be enabled and accessible, as this module relies on parsing this page.
|
||||||
status page has to be enabled and accessible, as this module relies on parsing
|
|
||||||
this page. This module supports ansible check_mode, and requires BeautifulSoup
|
|
||||||
python module.
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
requirements:
|
||||||
|
- Python package C(BeautifulSoup).
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
support: full
|
support: full
|
||||||
|
@ -31,28 +29,25 @@ options:
|
||||||
balancer_url_suffix:
|
balancer_url_suffix:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Suffix of the balancer pool url required to access the balancer pool
|
- Suffix of the balancer pool URL required to access the balancer pool status page (for example V(balancer_vhost[:port]/balancer_url_suffix)).
|
||||||
status page (e.g. balancer_vhost[:port]/balancer_url_suffix).
|
|
||||||
default: /balancer-manager/
|
default: /balancer-manager/
|
||||||
balancer_vhost:
|
balancer_vhost:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- (ipv4|ipv6|fqdn):port of the Apache httpd 2.4 mod_proxy balancer pool.
|
- (IPv4|IPv6|FQDN):port of the Apache httpd 2.4 mod_proxy balancer pool.
|
||||||
required: true
|
required: true
|
||||||
member_host:
|
member_host:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- (ipv4|ipv6|fqdn) of the balancer member to get or to set attributes to.
|
- (IPv4|IPv6|FQDN) of the balancer member to get or to set attributes to. Port number is autodetected and should not
|
||||||
Port number is autodetected and should not be specified here.
|
be specified here. If undefined, apache2_mod_proxy module will return a members list of dictionaries of all the current
|
||||||
If undefined, apache2_mod_proxy module will return a members list of
|
balancer pool members' attributes.
|
||||||
dictionaries of all the current balancer pool members' attributes.
|
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Desired state of the member host.
|
- Desired state of the member host. (absent|disabled),drained,hot_standby,ignore_errors can be simultaneously invoked
|
||||||
(absent|disabled),drained,hot_standby,ignore_errors can be
|
by separating them with a comma (for example V(state=drained,ignore_errors)).
|
||||||
simultaneously invoked by separating them with a comma (e.g. state=drained,ignore_errors).
|
- 'Accepted state values: [V(present), V(absent), V(enabled), V(disabled), V(drained), V(hot_standby), V(ignore_errors)].'
|
||||||
- 'Accepted state values: ["present", "absent", "enabled", "disabled", "drained", "hot_standby", "ignore_errors"]'
|
|
||||||
tls:
|
tls:
|
||||||
description:
|
description:
|
||||||
- Use https to access balancer management page.
|
- Use https to access balancer management page.
|
||||||
|
@ -63,9 +58,9 @@ options:
|
||||||
- Validate ssl/tls certificates.
|
- Validate ssl/tls certificates.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Get all current balancer pool members attributes
|
- name: Get all current balancer pool members attributes
|
||||||
community.general.apache2_mod_proxy:
|
community.general.apache2_mod_proxy:
|
||||||
balancer_vhost: 10.0.0.2
|
balancer_vhost: 10.0.0.2
|
||||||
|
@ -110,11 +105,11 @@ EXAMPLES = '''
|
||||||
member_host: '{{ member.host }}'
|
member_host: '{{ member.host }}'
|
||||||
state: absent
|
state: absent
|
||||||
delegate_to: myloadbalancernode
|
delegate_to: myloadbalancernode
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
member:
|
member:
|
||||||
description: specific balancer member information dictionary, returned when apache2_mod_proxy module is invoked with member_host parameter.
|
description: specific balancer member information dictionary, returned when apache2_mod_proxy module is invoked with C(member_host) parameter.
|
||||||
type: dict
|
type: dict
|
||||||
returned: success
|
returned: success
|
||||||
sample:
|
sample:
|
||||||
|
@ -145,7 +140,7 @@ member:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
members:
|
members:
|
||||||
description: list of member (defined above) dictionaries, returned when apache2_mod_proxy is invoked with no member_host and state args.
|
description: list of member (defined above) dictionaries, returned when apache2_mod_proxy is invoked with no C(member_host) and state args.
|
||||||
returned: success
|
returned: success
|
||||||
type: list
|
type: list
|
||||||
sample:
|
sample:
|
||||||
|
@ -201,7 +196,7 @@ members:
|
||||||
"ignore_errors": false}
|
"ignore_errors": false}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: apache2_module
|
module: apache2_module
|
||||||
author:
|
author:
|
||||||
- Christian Berendt (@berendt)
|
- Christian Berendt (@berendt)
|
||||||
|
@ -30,14 +29,13 @@ options:
|
||||||
name:
|
name:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Name of the module to enable/disable as given to C(a2enmod/a2dismod).
|
- Name of the module to enable/disable as given to C(a2enmod)/C(a2dismod).
|
||||||
required: true
|
required: true
|
||||||
identifier:
|
identifier:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Identifier of the module as listed by C(apache2ctl -M).
|
- Identifier of the module as listed by C(apache2ctl -M). This is optional and usually determined automatically by the
|
||||||
This is optional and usually determined automatically by the common convention of
|
common convention of appending V(_module) to O(name) as well as custom exception for popular modules.
|
||||||
appending V(_module) to O(name) as well as custom exception for popular modules.
|
|
||||||
required: false
|
required: false
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
|
@ -64,11 +62,11 @@ options:
|
||||||
version_added: 6.3.0
|
version_added: 6.3.0
|
||||||
requirements: ["a2enmod", "a2dismod"]
|
requirements: ["a2enmod", "a2dismod"]
|
||||||
notes:
|
notes:
|
||||||
- This does not work on RedHat-based distributions. It does work on Debian- and SuSE-based distributions.
|
- This does not work on RedHat-based distributions. It does work on Debian- and SuSE-based distributions. Whether it works
|
||||||
Whether it works on others depend on whether the C(a2enmod) and C(a2dismod) tools are available or not.
|
on others depend on whether the C(a2enmod) and C(a2dismod) tools are available or not.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Enable the Apache2 module wsgi
|
- name: Enable the Apache2 module wsgi
|
||||||
community.general.apache2_module:
|
community.general.apache2_module:
|
||||||
state: present
|
state: present
|
||||||
|
@ -108,30 +106,30 @@ EXAMPLES = '''
|
||||||
state: present
|
state: present
|
||||||
name: dump_io
|
name: dump_io
|
||||||
identifier: dumpio_module
|
identifier: dumpio_module
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
result:
|
result:
|
||||||
description: message about action taken
|
description: Message about action taken.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
warnings:
|
warnings:
|
||||||
description: list of warning messages
|
description: List of warning messages.
|
||||||
returned: when needed
|
returned: when needed
|
||||||
type: list
|
type: list
|
||||||
rc:
|
rc:
|
||||||
description: return code of underlying command
|
description: Return code of underlying command.
|
||||||
returned: failed
|
returned: failed
|
||||||
type: int
|
type: int
|
||||||
stdout:
|
stdout:
|
||||||
description: stdout of underlying command
|
description: The stdout of underlying command.
|
||||||
returned: failed
|
returned: failed
|
||||||
type: str
|
type: str
|
||||||
stderr:
|
stderr:
|
||||||
description: stderr of underlying command
|
description: The stderr of underlying command.
|
||||||
returned: failed
|
returned: failed
|
||||||
type: str
|
type: str
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: apk
|
module: apk
|
||||||
short_description: Manages apk packages
|
short_description: Manages apk packages
|
||||||
description:
|
description:
|
||||||
|
@ -29,15 +28,15 @@ attributes:
|
||||||
options:
|
options:
|
||||||
available:
|
available:
|
||||||
description:
|
description:
|
||||||
- During upgrade, reset versioned world dependencies and change logic to prefer replacing or downgrading packages (instead of holding them)
|
- During upgrade, reset versioned world dependencies and change logic to prefer replacing or downgrading packages (instead
|
||||||
if the currently installed package is no longer available from any repository.
|
of holding them) if the currently installed package is no longer available from any repository.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- A package name, like V(foo), or multiple packages, like V(foo,bar).
|
- A package name, like V(foo), or multiple packages, like V(foo,bar).
|
||||||
- Do not include additional whitespace when specifying multiple packages as a string.
|
- Do not include additional whitespace when specifying multiple packages as a string. Prefer YAML lists over comma-separating
|
||||||
Prefer YAML lists over comma-separating multiple package names.
|
multiple package names.
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
no_cache:
|
no_cache:
|
||||||
|
@ -48,8 +47,8 @@ options:
|
||||||
version_added: 1.0.0
|
version_added: 1.0.0
|
||||||
repository:
|
repository:
|
||||||
description:
|
description:
|
||||||
- A package repository or multiple repositories.
|
- A package repository or multiple repositories. Unlike with the underlying apk command, this list will override the
|
||||||
Unlike with the underlying apk command, this list will override the system repositories rather than supplement them.
|
system repositories rather than supplement them.
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
state:
|
state:
|
||||||
|
@ -73,17 +72,18 @@ options:
|
||||||
default: false
|
default: false
|
||||||
world:
|
world:
|
||||||
description:
|
description:
|
||||||
- Use a custom world file when checking for explicitly installed packages.
|
- Use a custom world file when checking for explicitly installed packages. The file is used only when a value is provided
|
||||||
The file is used only when a value is provided for O(name), and O(state) is set to V(present) or V(latest).
|
for O(name), and O(state) is set to V(present) or V(latest).
|
||||||
type: str
|
type: str
|
||||||
default: /etc/apk/world
|
default: /etc/apk/world
|
||||||
version_added: 5.4.0
|
version_added: 5.4.0
|
||||||
notes:
|
notes:
|
||||||
- 'O(name) and O(upgrade) are mutually exclusive.'
|
- O(name) and O(upgrade) are mutually exclusive.
|
||||||
- When used with a C(loop:) each package will be processed individually, it is much more efficient to pass the list directly to the O(name) option.
|
- When used with a C(loop:) each package will be processed individually, it is much more efficient to pass the list directly
|
||||||
'''
|
to the O(name) option.
|
||||||
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Update repositories and install foo package
|
- name: Update repositories and install foo package
|
||||||
community.general.apk:
|
community.general.apk:
|
||||||
name: foo
|
name: foo
|
||||||
|
@ -157,15 +157,15 @@ EXAMPLES = '''
|
||||||
name: foo
|
name: foo
|
||||||
state: latest
|
state: latest
|
||||||
world: /etc/apk/world.custom
|
world: /etc/apk/world.custom
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
packages:
|
packages:
|
||||||
description: a list of packages that have been changed
|
description: A list of packages that have been changed.
|
||||||
returned: when packages have changed
|
returned: when packages have changed
|
||||||
type: list
|
type: list
|
||||||
sample: ['package', 'other-package']
|
sample: ['package', 'other-package']
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
# Import module snippets.
|
# Import module snippets.
|
||||||
|
|
|
@ -9,16 +9,15 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: apt_repo
|
module: apt_repo
|
||||||
short_description: Manage APT repositories via apt-repo
|
short_description: Manage APT repositories using C(apt-repo)
|
||||||
description:
|
description:
|
||||||
- Manages APT repositories using apt-repo tool.
|
- Manages APT repositories using C(apt-repo) tool.
|
||||||
- See U(https://www.altlinux.org/Apt-repo) for details about apt-repo
|
- See U(https://www.altlinux.org/Apt-repo) for details about C(apt-repo).
|
||||||
notes:
|
notes:
|
||||||
- This module works on ALT based distros.
|
- This module works on ALT based distros.
|
||||||
- Does NOT support checkmode, due to a limitation in apt-repo tool.
|
- Does NOT support checkmode, due to a limitation in C(apt-repo) tool.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -40,8 +39,8 @@ options:
|
||||||
type: str
|
type: str
|
||||||
remove_others:
|
remove_others:
|
||||||
description:
|
description:
|
||||||
- Remove other then added repositories
|
- Remove other then added repositories.
|
||||||
- Used if O(state=present)
|
- Used if O(state=present).
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
update:
|
update:
|
||||||
|
@ -51,9 +50,9 @@ options:
|
||||||
default: false
|
default: false
|
||||||
author:
|
author:
|
||||||
- Mikhail Gordeev (@obirvalger)
|
- Mikhail Gordeev (@obirvalger)
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Remove all repositories
|
- name: Remove all repositories
|
||||||
community.general.apt_repo:
|
community.general.apt_repo:
|
||||||
repo: all
|
repo: all
|
||||||
|
@ -70,9 +69,9 @@ EXAMPLES = '''
|
||||||
repo: copy:///space/ALT/Sisyphus
|
repo: copy:///space/ALT/Sisyphus
|
||||||
state: present
|
state: present
|
||||||
update: true
|
update: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = ''' # '''
|
RETURN = """ # """
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
|
@ -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 = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: apt_rpm
|
module: apt_rpm
|
||||||
short_description: APT-RPM package manager
|
short_description: APT-RPM package manager
|
||||||
description:
|
description:
|
||||||
|
@ -28,18 +27,16 @@ options:
|
||||||
package:
|
package:
|
||||||
description:
|
description:
|
||||||
- List of packages to install, upgrade, or remove.
|
- List of packages to install, upgrade, or remove.
|
||||||
- Since community.general 8.0.0, may include paths to local C(.rpm) files
|
- Since community.general 8.0.0, may include paths to local C(.rpm) files if O(state=installed) or O(state=present),
|
||||||
if O(state=installed) or O(state=present), requires C(rpm) python
|
requires C(rpm) Python module.
|
||||||
module.
|
|
||||||
aliases: [name, pkg]
|
aliases: [name, pkg]
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Indicates the desired package state.
|
- Indicates the desired package state.
|
||||||
- Please note that V(present) and V(installed) are equivalent to V(latest) right now.
|
- Please note that V(present) and V(installed) are equivalent to V(latest) right now. This will change in the future.
|
||||||
This will change in the future. To simply ensure that a package is installed, without upgrading
|
To simply ensure that a package is installed, without upgrading it, use the V(present_not_latest) state.
|
||||||
it, use the V(present_not_latest) state.
|
|
||||||
- The states V(latest) and V(present_not_latest) have been added in community.general 8.6.0.
|
- The states V(latest) and V(present_not_latest) have been added in community.general 8.6.0.
|
||||||
choices:
|
choices:
|
||||||
- absent
|
- absent
|
||||||
|
@ -52,14 +49,15 @@ options:
|
||||||
type: str
|
type: str
|
||||||
update_cache:
|
update_cache:
|
||||||
description:
|
description:
|
||||||
- Run the equivalent of C(apt-get update) before the operation. Can be run as part of the package installation or as a separate step.
|
- Run the equivalent of C(apt-get update) before the operation. Can be run as part of the package installation or as
|
||||||
|
a separate step.
|
||||||
- Default is not to update the cache.
|
- Default is not to update the cache.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
clean:
|
clean:
|
||||||
description:
|
description:
|
||||||
- Run the equivalent of C(apt-get clean) to clear out the local repository of retrieved package files. It removes everything but
|
- Run the equivalent of C(apt-get clean) to clear out the local repository of retrieved package files. It removes everything
|
||||||
the lock file from C(/var/cache/apt/archives/) and C(/var/cache/apt/archives/partial/).
|
but the lock file from C(/var/cache/apt/archives/) and C(/var/cache/apt/archives/partial/).
|
||||||
- Can be run as part of the package installation (clean runs before install) or as a separate step.
|
- Can be run as part of the package installation (clean runs before install) or as a separate step.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
|
@ -77,13 +75,12 @@ options:
|
||||||
default: false
|
default: false
|
||||||
version_added: 6.5.0
|
version_added: 6.5.0
|
||||||
requirements:
|
requirements:
|
||||||
- C(rpm) python package (rpm bindings), optional. Required if O(package)
|
- C(rpm) Python package (rpm bindings), optional. Required if O(package) option includes local files.
|
||||||
option includes local files.
|
|
||||||
author:
|
author:
|
||||||
- Evgenii Terechkov (@evgkrsk)
|
- Evgenii Terechkov (@evgkrsk)
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Install package foo
|
- name: Install package foo
|
||||||
community.general.apt_rpm:
|
community.general.apt_rpm:
|
||||||
pkg: foo
|
pkg: foo
|
||||||
|
@ -122,7 +119,7 @@ EXAMPLES = '''
|
||||||
update_cache: true
|
update_cache: true
|
||||||
dist_upgrade: true
|
dist_upgrade: true
|
||||||
update_kernel: true
|
update_kernel: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -10,8 +10,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: archive
|
module: archive
|
||||||
short_description: Creates a compressed archive of one or more files or trees
|
short_description: Creates a compressed archive of one or more files or trees
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -19,7 +18,7 @@ extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
description:
|
description:
|
||||||
- Creates or extends an archive.
|
- Creates or extends an archive.
|
||||||
- The source and archive are on the remote host, and the archive I(is not) copied to the local host.
|
- The source and archive are on the target host, and the archive I(is not) copied to the controller host.
|
||||||
- Source files can be deleted after archival by specifying O(remove=True).
|
- Source files can be deleted after archival by specifying O(remove=True).
|
||||||
attributes:
|
attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
|
@ -42,12 +41,14 @@ options:
|
||||||
dest:
|
dest:
|
||||||
description:
|
description:
|
||||||
- The file name of the destination archive. The parent directory must exists on the remote host.
|
- The file name of the destination archive. The parent directory must exists on the remote host.
|
||||||
- This is required when O(path) refers to multiple files by either specifying a glob, a directory or multiple paths in a list.
|
- This is required when O(path) refers to multiple files by either specifying a glob, a directory or multiple paths
|
||||||
|
in a list.
|
||||||
- If the destination archive already exists, it will be truncated and overwritten.
|
- If the destination archive already exists, it will be truncated and overwritten.
|
||||||
type: path
|
type: path
|
||||||
exclude_path:
|
exclude_path:
|
||||||
description:
|
description:
|
||||||
- Remote absolute path, glob, or list of paths or globs for the file or files to exclude from O(path) list and glob expansion.
|
- Remote absolute path, glob, or list of paths or globs for the file or files to exclude from O(path) list and glob
|
||||||
|
expansion.
|
||||||
- Use O(exclusion_patterns) to instead exclude files or subdirectories below any of the paths from the O(path) list.
|
- Use O(exclusion_patterns) to instead exclude files or subdirectories below any of the paths from the O(path) list.
|
||||||
type: list
|
type: list
|
||||||
elements: path
|
elements: path
|
||||||
|
@ -73,17 +74,18 @@ options:
|
||||||
default: false
|
default: false
|
||||||
notes:
|
notes:
|
||||||
- Can produce C(gzip), C(bzip2), C(lzma), and C(zip) compressed files or archives.
|
- Can produce C(gzip), C(bzip2), C(lzma), and C(zip) compressed files or archives.
|
||||||
- This module uses C(tarfile), C(zipfile), C(gzip), and C(bz2) packages on the target host to create archives.
|
- This module uses C(tarfile), C(zipfile), C(gzip), and C(bz2) packages on the target host to create archives. These are
|
||||||
These are part of the Python standard library for Python 2 and 3.
|
part of the Python standard library for Python 2 and 3.
|
||||||
requirements:
|
requirements:
|
||||||
- Requires C(lzma) (standard library of Python 3) or L(backports.lzma, https://pypi.org/project/backports.lzma/) (Python 2) if using C(xz) format.
|
- Requires C(lzma) (standard library of Python 3) or L(backports.lzma, https://pypi.org/project/backports.lzma/) (Python
|
||||||
|
2) if using C(xz) format.
|
||||||
seealso:
|
seealso:
|
||||||
- module: ansible.builtin.unarchive
|
- module: ansible.builtin.unarchive
|
||||||
author:
|
author:
|
||||||
- Ben Doherty (@bendoh)
|
- Ben Doherty (@bendoh)
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Compress directory /path/to/foo/ into /path/to/foo.tgz
|
- name: Compress directory /path/to/foo/ into /path/to/foo.tgz
|
||||||
community.general.archive:
|
community.general.archive:
|
||||||
path: /path/to/foo
|
path: /path/to/foo
|
||||||
|
@ -138,12 +140,11 @@ EXAMPLES = r'''
|
||||||
dest: /path/file.tar.gz
|
dest: /path/file.tar.gz
|
||||||
format: gz
|
format: gz
|
||||||
force_archive: true
|
force_archive: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
state:
|
state:
|
||||||
description:
|
description: The state of the input O(path).
|
||||||
The state of the input O(path).
|
|
||||||
type: str
|
type: str
|
||||||
returned: always
|
returned: always
|
||||||
dest_state:
|
dest_state:
|
||||||
|
@ -176,7 +177,7 @@ expanded_exclude_paths:
|
||||||
description: The list of matching exclude paths from the exclude_path argument.
|
description: The list of matching exclude paths from the exclude_path argument.
|
||||||
type: list
|
type: list
|
||||||
returned: always
|
returned: always
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
import bz2
|
import bz2
|
||||||
|
|
|
@ -9,18 +9,17 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: atomic_container
|
module: atomic_container
|
||||||
short_description: Manage the containers on the atomic host platform
|
short_description: Manage the containers on the atomic host platform
|
||||||
description:
|
description:
|
||||||
- Manage the containers on the atomic host platform.
|
- Manage the containers on the atomic host platform.
|
||||||
- Allows to manage the lifecycle of a container on the atomic host platform.
|
- Allows to manage the lifecycle of a container on the atomic host platform.
|
||||||
author: "Giuseppe Scrivano (@giuseppe)"
|
author: "Giuseppe Scrivano (@giuseppe)"
|
||||||
notes:
|
|
||||||
- Host should support C(atomic) command
|
|
||||||
requirements:
|
requirements:
|
||||||
- atomic
|
- atomic
|
||||||
|
notes:
|
||||||
|
- According to U(https://projectatomic.io/) the project has been sunset around 2019/2020, in favor of C(podman) and Fedora CoreOS.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -68,10 +67,9 @@ options:
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
default: []
|
default: []
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
|
||||||
|
|
||||||
|
EXAMPLES = r"""
|
||||||
- name: Install the etcd system container
|
- name: Install the etcd system container
|
||||||
community.general.atomic_container:
|
community.general.atomic_container:
|
||||||
name: etcd
|
name: etcd
|
||||||
|
@ -89,15 +87,15 @@ EXAMPLES = r'''
|
||||||
backend: ostree
|
backend: ostree
|
||||||
state: absent
|
state: absent
|
||||||
mode: system
|
mode: system
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
msg:
|
msg:
|
||||||
description: The command standard output
|
description: The command standard output.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: 'Using default tag: latest ...'
|
sample: 'Using default tag: latest ...'
|
||||||
'''
|
"""
|
||||||
|
|
||||||
# import module snippets
|
# import module snippets
|
||||||
import traceback
|
import traceback
|
||||||
|
|
|
@ -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: atomic_host
|
module: atomic_host
|
||||||
short_description: Manage the atomic host platform
|
short_description: Manage the atomic host platform
|
||||||
description:
|
description:
|
||||||
|
@ -19,6 +18,7 @@ author:
|
||||||
- Saravanan KR (@krsacme)
|
- Saravanan KR (@krsacme)
|
||||||
notes:
|
notes:
|
||||||
- Host should be an atomic platform (verified by existence of '/run/ostree-booted' file).
|
- Host should be an atomic platform (verified by existence of '/run/ostree-booted' file).
|
||||||
|
- According to U(https://projectatomic.io/) the project has been sunset around 2019/2020, in favor of C(podman) and Fedora CoreOS.
|
||||||
requirements:
|
requirements:
|
||||||
- atomic
|
- atomic
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -36,9 +36,9 @@ options:
|
||||||
default: 'latest'
|
default: 'latest'
|
||||||
aliases: [version]
|
aliases: [version]
|
||||||
type: str
|
type: str
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Upgrade the atomic host platform to the latest version (atomic host upgrade)
|
- name: Upgrade the atomic host platform to the latest version (atomic host upgrade)
|
||||||
community.general.atomic_host:
|
community.general.atomic_host:
|
||||||
revision: latest
|
revision: latest
|
||||||
|
@ -46,15 +46,15 @@ EXAMPLES = r'''
|
||||||
- name: Deploy a specific revision as the atomic host (atomic host deploy 23.130)
|
- name: Deploy a specific revision as the atomic host (atomic host deploy 23.130)
|
||||||
community.general.atomic_host:
|
community.general.atomic_host:
|
||||||
revision: 23.130
|
revision: 23.130
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
msg:
|
msg:
|
||||||
description: The command standard output
|
description: The command standard output.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: 'Already on latest'
|
sample: 'Already on latest'
|
||||||
'''
|
"""
|
||||||
import os
|
import os
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
|
|
@ -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: atomic_image
|
module: atomic_image
|
||||||
short_description: Manage the container images on the atomic host platform
|
short_description: Manage the container images on the atomic host platform
|
||||||
description:
|
description:
|
||||||
|
@ -18,7 +17,7 @@ description:
|
||||||
author:
|
author:
|
||||||
- Saravanan KR (@krsacme)
|
- Saravanan KR (@krsacme)
|
||||||
notes:
|
notes:
|
||||||
- Host should support C(atomic) command.
|
- According to U(https://projectatomic.io/) the project has been sunset around 2019/2020, in favor of C(podman) and Fedora CoreOS.
|
||||||
requirements:
|
requirements:
|
||||||
- atomic
|
- atomic
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -42,18 +41,19 @@ options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- The state of the container image.
|
- The state of the container image.
|
||||||
- The state V(latest) will ensure container image is upgraded to the latest version and forcefully restart container, if running.
|
- The state V(latest) will ensure container image is upgraded to the latest version and forcefully restart container,
|
||||||
|
if running.
|
||||||
choices: ['absent', 'latest', 'present']
|
choices: ['absent', 'latest', 'present']
|
||||||
default: 'latest'
|
default: 'latest'
|
||||||
type: str
|
type: str
|
||||||
started:
|
started:
|
||||||
description:
|
description:
|
||||||
- Start or Stop the container.
|
- Start or stop the container.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Execute the run command on rsyslog container image (atomic run rhel7/rsyslog)
|
- name: Execute the run command on rsyslog container image (atomic run rhel7/rsyslog)
|
||||||
community.general.atomic_image:
|
community.general.atomic_image:
|
||||||
name: rhel7/rsyslog
|
name: rhel7/rsyslog
|
||||||
|
@ -64,15 +64,15 @@ EXAMPLES = r'''
|
||||||
name: busybox
|
name: busybox
|
||||||
state: latest
|
state: latest
|
||||||
backend: ostree
|
backend: ostree
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
msg:
|
msg:
|
||||||
description: The command standard output
|
description: The command standard output.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: 'Using default tag: latest ...'
|
sample: 'Using default tag: latest ...'
|
||||||
'''
|
"""
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
|
@ -9,15 +9,14 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: awall
|
module: awall
|
||||||
short_description: Manage awall policies
|
short_description: Manage awall policies
|
||||||
author: Ted Trask (@tdtrask) <ttrask01@yahoo.com>
|
author: Ted Trask (@tdtrask) <ttrask01@yahoo.com>
|
||||||
description:
|
description:
|
||||||
- This modules allows for enable/disable/activate of C(awall) policies.
|
- This modules allows for enable/disable/activate of C(awall) policies.
|
||||||
- Alpine Wall (C(awall)) generates a firewall configuration from the enabled policy files
|
- Alpine Wall (C(awall)) generates a firewall configuration from the enabled policy files and activates the configuration
|
||||||
and activates the configuration on the system.
|
on the system.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -46,9 +45,9 @@ options:
|
||||||
default: false
|
default: false
|
||||||
notes:
|
notes:
|
||||||
- At least one of O(name) and O(activate) is required.
|
- At least one of O(name) and O(activate) is required.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Enable "foo" and "bar" policy
|
- name: Enable "foo" and "bar" policy
|
||||||
community.general.awall:
|
community.general.awall:
|
||||||
name: [foo bar]
|
name: [foo bar]
|
||||||
|
@ -65,9 +64,9 @@ EXAMPLES = r'''
|
||||||
- name: Activate currently enabled firewall rules
|
- name: Activate currently enabled firewall rules
|
||||||
community.general.awall:
|
community.general.awall:
|
||||||
activate: true
|
activate: true
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = ''' # '''
|
RETURN = """ # """
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: beadm
|
module: beadm
|
||||||
short_description: Manage ZFS boot environments on FreeBSD/Solaris/illumos systems
|
short_description: Manage ZFS boot environments on FreeBSD/Solaris/illumos systems
|
||||||
description:
|
description:
|
||||||
|
@ -33,13 +32,11 @@ options:
|
||||||
aliases: ["be"]
|
aliases: ["be"]
|
||||||
snapshot:
|
snapshot:
|
||||||
description:
|
description:
|
||||||
- If specified, the new boot environment will be cloned from the given
|
- If specified, the new boot environment will be cloned from the given snapshot or inactive boot environment.
|
||||||
snapshot or inactive boot environment.
|
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
description:
|
description:
|
||||||
- Associate a description with a new boot environment. This option is
|
- Associate a description with a new boot environment. This option is available only on Solarish platforms.
|
||||||
available only on Solarish platforms.
|
|
||||||
type: str
|
type: str
|
||||||
options:
|
options:
|
||||||
description:
|
description:
|
||||||
|
@ -62,9 +59,9 @@ options:
|
||||||
- Specifies if the unmount should be forced.
|
- Specifies if the unmount should be forced.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Create ZFS boot environment
|
- name: Create ZFS boot environment
|
||||||
community.general.beadm:
|
community.general.beadm:
|
||||||
name: upgrade-be
|
name: upgrade-be
|
||||||
|
@ -103,45 +100,45 @@ EXAMPLES = r'''
|
||||||
community.general.beadm:
|
community.general.beadm:
|
||||||
name: upgrade-be
|
name: upgrade-be
|
||||||
state: activated
|
state: activated
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
name:
|
name:
|
||||||
description: BE name
|
description: BE name.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: pre-upgrade
|
sample: pre-upgrade
|
||||||
snapshot:
|
snapshot:
|
||||||
description: ZFS snapshot to create BE from
|
description: ZFS snapshot to create BE from.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: rpool/ROOT/oi-hipster@fresh
|
sample: rpool/ROOT/oi-hipster@fresh
|
||||||
description:
|
description:
|
||||||
description: BE description
|
description: BE description.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: Upgrade from 9.0 to 10.0
|
sample: Upgrade from 9.0 to 10.0
|
||||||
options:
|
options:
|
||||||
description: BE additional options
|
description: BE additional options.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: compression=on
|
sample: compression=on
|
||||||
mountpoint:
|
mountpoint:
|
||||||
description: BE mountpoint
|
description: BE mountpoint.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: /mnt/be
|
sample: /mnt/be
|
||||||
state:
|
state:
|
||||||
description: state of the target
|
description: State of the target.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: present
|
sample: present
|
||||||
force:
|
force:
|
||||||
description: If forced action is wanted
|
description: If forced action is wanted.
|
||||||
returned: always
|
returned: always
|
||||||
type: bool
|
type: bool
|
||||||
sample: false
|
sample: false
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
|
@ -7,12 +7,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: bearychat
|
module: bearychat
|
||||||
short_description: Send BearyChat notifications
|
short_description: Send BearyChat notifications
|
||||||
description:
|
description:
|
||||||
- The M(community.general.bearychat) module sends notifications to U(https://bearychat.com)
|
- The M(community.general.bearychat) module sends notifications to U(https://bearychat.com) using the Incoming Robot integration.
|
||||||
via the Incoming Robot integration.
|
|
||||||
author: "Jiangge Zhang (@tonyseek)"
|
author: "Jiangge Zhang (@tonyseek)"
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
@ -25,8 +24,7 @@ options:
|
||||||
url:
|
url:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- BearyChat WebHook URL. This authenticates you to the bearychat
|
- BearyChat WebHook URL. This authenticates you to the bearychat service. It looks like
|
||||||
service. It looks like
|
|
||||||
V(https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60).
|
V(https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60).
|
||||||
required: true
|
required: true
|
||||||
text:
|
text:
|
||||||
|
@ -41,17 +39,16 @@ options:
|
||||||
channel:
|
channel:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Channel to send the message to. If absent, the message goes to the
|
- Channel to send the message to. If absent, the message goes to the default channel selected by the O(url).
|
||||||
default channel selected by the O(url).
|
|
||||||
attachments:
|
attachments:
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
description:
|
description:
|
||||||
- Define a list of attachments. For more information, see
|
- Define a list of attachments. For more information, see
|
||||||
https://github.com/bearyinnovative/bearychat-tutorial/blob/master/robots/incoming.md#attachments
|
U(https://github.com/bearyinnovative/bearychat-tutorial/blob/master/robots/incoming.md#attachments).
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = r"""
|
||||||
- name: Send notification message via BearyChat
|
- name: Send notification message via BearyChat
|
||||||
local_action:
|
local_action:
|
||||||
module: bearychat
|
module: bearychat
|
||||||
|
@ -75,9 +72,9 @@ EXAMPLES = """
|
||||||
- http://example.com/index.png
|
- http://example.com/index.png
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RETURN = """
|
RETURN = r"""
|
||||||
msg:
|
msg:
|
||||||
description: execution result
|
description: Execution result.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
sample: "OK"
|
sample: "OK"
|
||||||
|
|
|
@ -8,13 +8,13 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: bigpanda
|
module: bigpanda
|
||||||
author: "Hagai Kariti (@hkariti)"
|
author: "Hagai Kariti (@hkariti)"
|
||||||
short_description: Notify BigPanda about deployments
|
short_description: Notify BigPanda about deployments
|
||||||
description:
|
description:
|
||||||
- Notify BigPanda when deployments start and end (successfully or not). Returns a deployment object containing all the parameters for future module calls.
|
- Notify BigPanda when deployments start and end (successfully or not). Returns a deployment object containing all the parameters
|
||||||
|
for future module calls.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -26,7 +26,7 @@ options:
|
||||||
component:
|
component:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- "The name of the component being deployed. Ex: billing"
|
- 'The name of the component being deployed. Ex: V(billing).'
|
||||||
required: true
|
required: true
|
||||||
aliases: ['name']
|
aliases: ['name']
|
||||||
version:
|
version:
|
||||||
|
@ -55,7 +55,7 @@ options:
|
||||||
env:
|
env:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The environment name, typically 'production', 'staging', etc.
|
- The environment name, typically V(production), V(staging), and so on.
|
||||||
required: false
|
required: false
|
||||||
owner:
|
owner:
|
||||||
type: str
|
type: str
|
||||||
|
@ -75,8 +75,8 @@ options:
|
||||||
default: "https://api.bigpanda.io"
|
default: "https://api.bigpanda.io"
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If V(false), SSL certificates for the target url will not be validated. This should only be used
|
- If V(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled
|
||||||
on personally controlled sites using self-signed certificates.
|
sites using self-signed certificates.
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: bool
|
type: bool
|
||||||
|
@ -88,14 +88,14 @@ options:
|
||||||
source_system:
|
source_system:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Source system used in the requests to the API
|
- Source system used in the requests to the API.
|
||||||
default: ansible
|
default: ansible
|
||||||
|
|
||||||
# informational: requirements for nodes
|
# informational: requirements for nodes
|
||||||
requirements: []
|
requirements: []
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Notify BigPanda about a deployment
|
- name: Notify BigPanda about a deployment
|
||||||
community.general.bigpanda:
|
community.general.bigpanda:
|
||||||
component: myapp
|
component: myapp
|
||||||
|
@ -128,7 +128,7 @@ EXAMPLES = '''
|
||||||
token: '{{ deployment.token }}'
|
token: '{{ deployment.token }}'
|
||||||
state: finished
|
state: finished
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
'''
|
"""
|
||||||
|
|
||||||
# ===========================================
|
# ===========================================
|
||||||
# Module execution.
|
# Module execution.
|
||||||
|
|
|
@ -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: bitbucket_access_key
|
module: bitbucket_access_key
|
||||||
short_description: Manages Bitbucket repository access keys
|
short_description: Manages Bitbucket repository access keys
|
||||||
description:
|
description:
|
||||||
|
@ -33,7 +32,7 @@ options:
|
||||||
workspace:
|
workspace:
|
||||||
description:
|
description:
|
||||||
- The repository owner.
|
- The repository owner.
|
||||||
- "B(Note:) O(ignore:username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of O(user)."
|
- B(Note:) O(ignore:username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of O(user).
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
key:
|
key:
|
||||||
|
@ -54,9 +53,9 @@ options:
|
||||||
notes:
|
notes:
|
||||||
- Bitbucket OAuth consumer or App password should have permissions to read and administrate account repositories.
|
- Bitbucket OAuth consumer or App password should have permissions to read and administrate account repositories.
|
||||||
- Check mode is supported.
|
- Check mode is supported.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Create access key
|
- name: Create access key
|
||||||
community.general.bitbucket_access_key:
|
community.general.bitbucket_access_key:
|
||||||
repository: 'bitbucket-repo'
|
repository: 'bitbucket-repo'
|
||||||
|
@ -71,9 +70,9 @@ EXAMPLES = r'''
|
||||||
workspace: bitbucket_workspace
|
workspace: bitbucket_workspace
|
||||||
label: Bitbucket
|
label: Bitbucket
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r''' # '''
|
RETURN = r""" # """
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||||
|
|
|
@ -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: bitbucket_pipeline_key_pair
|
module: bitbucket_pipeline_key_pair
|
||||||
short_description: Manages Bitbucket pipeline SSH key pair
|
short_description: Manages Bitbucket pipeline SSH key pair
|
||||||
description:
|
description:
|
||||||
|
@ -33,7 +32,7 @@ options:
|
||||||
workspace:
|
workspace:
|
||||||
description:
|
description:
|
||||||
- The repository owner.
|
- The repository owner.
|
||||||
- "B(Note:) O(ignore:username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of O(user)."
|
- B(Note:) O(ignore:username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of O(user).
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
public_key:
|
public_key:
|
||||||
|
@ -52,9 +51,9 @@ options:
|
||||||
choices: [absent, present]
|
choices: [absent, present]
|
||||||
notes:
|
notes:
|
||||||
- Check mode is supported.
|
- Check mode is supported.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Create or update SSH key pair
|
- name: Create or update SSH key pair
|
||||||
community.general.bitbucket_pipeline_key_pair:
|
community.general.bitbucket_pipeline_key_pair:
|
||||||
repository: 'bitbucket-repo'
|
repository: 'bitbucket-repo'
|
||||||
|
@ -68,9 +67,9 @@ EXAMPLES = r'''
|
||||||
repository: bitbucket-repo
|
repository: bitbucket-repo
|
||||||
workspace: bitbucket_workspace
|
workspace: bitbucket_workspace
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r''' # '''
|
RETURN = r""" # """
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
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: bitbucket_pipeline_known_host
|
module: bitbucket_pipeline_known_host
|
||||||
short_description: Manages Bitbucket pipeline known hosts
|
short_description: Manages Bitbucket pipeline known hosts
|
||||||
description:
|
description:
|
||||||
- Manages Bitbucket pipeline known hosts under the "SSH Keys" menu.
|
- Manages Bitbucket pipeline known hosts under the "SSH Keys" menu.
|
||||||
- The host fingerprint will be retrieved automatically, but in case of an error, one can use O(key) field to specify it manually.
|
- The host fingerprint will be retrieved automatically, but in case of an error, one can use O(key) field to specify it
|
||||||
|
manually.
|
||||||
author:
|
author:
|
||||||
- Evgeniy Krysanov (@catcombo)
|
- Evgeniy Krysanov (@catcombo)
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
@ -36,7 +36,7 @@ options:
|
||||||
workspace:
|
workspace:
|
||||||
description:
|
description:
|
||||||
- The repository owner.
|
- The repository owner.
|
||||||
- "B(Note:) O(ignore:username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of O(user)."
|
- B(Note:) O(ignore:username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of O(user).
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
name:
|
name:
|
||||||
|
@ -56,9 +56,9 @@ options:
|
||||||
choices: [absent, present]
|
choices: [absent, present]
|
||||||
notes:
|
notes:
|
||||||
- Check mode is supported.
|
- Check mode is supported.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Create known hosts from the list
|
- name: Create known hosts from the list
|
||||||
community.general.bitbucket_pipeline_known_host:
|
community.general.bitbucket_pipeline_known_host:
|
||||||
repository: 'bitbucket-repo'
|
repository: 'bitbucket-repo'
|
||||||
|
@ -83,9 +83,9 @@ EXAMPLES = r'''
|
||||||
name: bitbucket.org
|
name: bitbucket.org
|
||||||
key: '{{lookup("file", "bitbucket.pub") }}'
|
key: '{{lookup("file", "bitbucket.pub") }}'
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r''' # '''
|
RETURN = r""" # """
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
|
|
|
@ -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: bitbucket_pipeline_variable
|
module: bitbucket_pipeline_variable
|
||||||
short_description: Manages Bitbucket pipeline variables
|
short_description: Manages Bitbucket pipeline variables
|
||||||
description:
|
description:
|
||||||
|
@ -33,7 +32,7 @@ options:
|
||||||
workspace:
|
workspace:
|
||||||
description:
|
description:
|
||||||
- The repository owner.
|
- The repository owner.
|
||||||
- "B(Note:) O(ignore:username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of O(user)."
|
- B(Note:) O(ignore:username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of O(user).
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
name:
|
name:
|
||||||
|
@ -59,9 +58,9 @@ options:
|
||||||
notes:
|
notes:
|
||||||
- Check mode is supported.
|
- Check mode is supported.
|
||||||
- For secured values return parameter C(changed) is always V(true).
|
- For secured values return parameter C(changed) is always V(true).
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Create or update pipeline variables from the list
|
- name: Create or update pipeline variables from the list
|
||||||
community.general.bitbucket_pipeline_variable:
|
community.general.bitbucket_pipeline_variable:
|
||||||
repository: 'bitbucket-repo'
|
repository: 'bitbucket-repo'
|
||||||
|
@ -80,9 +79,9 @@ EXAMPLES = r'''
|
||||||
workspace: bitbucket_workspace
|
workspace: bitbucket_workspace
|
||||||
name: AWS_ACCESS_KEY
|
name: AWS_ACCESS_KEY
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r''' # '''
|
RETURN = r""" # """
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, _load_params
|
from ansible.module_utils.basic import AnsibleModule, _load_params
|
||||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||||
|
|
|
@ -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"""
|
||||||
---
|
|
||||||
module: bootc_manage
|
module: bootc_manage
|
||||||
version_added: 9.3.0
|
version_added: 9.3.0
|
||||||
author:
|
author:
|
||||||
|
@ -20,22 +19,21 @@ description:
|
||||||
options:
|
options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- 'Control to apply the latest image or switch the image.'
|
- Control whether to apply the latest image or switch the image.
|
||||||
- 'B(Note:) This will not reboot the system.'
|
- B(Note:) This will not reboot the system.
|
||||||
- 'Please use M(ansible.builtin.reboot) to reboot the system.'
|
- Please use M(ansible.builtin.reboot) to reboot the system.
|
||||||
required: true
|
required: true
|
||||||
type: str
|
type: str
|
||||||
choices: ['switch', 'latest']
|
choices: ['switch', 'latest']
|
||||||
image:
|
image:
|
||||||
description:
|
description:
|
||||||
- 'The image to switch to.'
|
- The image to switch to.
|
||||||
- 'This is required when O(state=switch).'
|
- This is required when O(state=switch).
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
EXAMPLES = r"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
|
||||||
# Switch to a different image
|
# Switch to a different image
|
||||||
- name: Provide image to switch to a different image and retain the current running image
|
- name: Provide image to switch to a different image and retain the current running image
|
||||||
community.general.bootc_manage:
|
community.general.bootc_manage:
|
||||||
|
@ -46,10 +44,10 @@ EXAMPLES = '''
|
||||||
- name: Apply updates of the current running image
|
- name: Apply updates of the current running image
|
||||||
community.general.bootc_manage:
|
community.general.bootc_manage:
|
||||||
state: latest
|
state: latest
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r"""
|
||||||
'''
|
"""
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
|
@ -9,12 +9,11 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: bower
|
module: bower
|
||||||
short_description: Manage bower packages with bower
|
short_description: Manage bower packages with C(bower)
|
||||||
description:
|
description:
|
||||||
- Manage bower packages with bower
|
- Manage bower packages with C(bower).
|
||||||
author: "Michael Warkentin (@mwarkentin)"
|
author: "Michael Warkentin (@mwarkentin)"
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
@ -27,39 +26,39 @@ options:
|
||||||
name:
|
name:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The name of a bower package to install
|
- The name of a bower package to install.
|
||||||
offline:
|
offline:
|
||||||
description:
|
description:
|
||||||
- Install packages from local cache, if the packages were installed before
|
- Install packages from local cache, if the packages were installed before.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
production:
|
production:
|
||||||
description:
|
description:
|
||||||
- Install with --production flag
|
- Install with C(--production) flag.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
path:
|
path:
|
||||||
type: path
|
type: path
|
||||||
description:
|
description:
|
||||||
- The base path where to install the bower packages
|
- The base path where to install the bower packages.
|
||||||
required: true
|
required: true
|
||||||
relative_execpath:
|
relative_execpath:
|
||||||
type: path
|
type: path
|
||||||
description:
|
description:
|
||||||
- Relative path to bower executable from install path
|
- Relative path to bower executable from install path.
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The state of the bower package
|
- The state of the bower package.
|
||||||
default: present
|
default: present
|
||||||
choices: ["present", "absent", "latest"]
|
choices: ["present", "absent", "latest"]
|
||||||
version:
|
version:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The version to be installed
|
- The version to be installed.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Install "bootstrap" bower package.
|
- name: Install "bootstrap" bower package.
|
||||||
community.general.bower:
|
community.general.bower:
|
||||||
name: bootstrap
|
name: bootstrap
|
||||||
|
@ -91,7 +90,8 @@ EXAMPLES = '''
|
||||||
- community.general.bower:
|
- community.general.bower:
|
||||||
path: /app/location
|
path: /app/location
|
||||||
relative_execpath: node_modules/.bin
|
relative_execpath: node_modules/.bin
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,11 @@
|
||||||
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: btrfs_info
|
module: btrfs_info
|
||||||
short_description: Query btrfs filesystem info
|
short_description: Query btrfs filesystem info
|
||||||
version_added: "6.6.0"
|
version_added: "6.6.0"
|
||||||
description: Query status of available btrfs filesystems, including uuid, label, subvolumes and mountpoints.
|
description: Query status of available btrfs filesystems, including UUID, label, subvolumes and mountpoints.
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- Gregory Furlong (@gnfzdz)
|
- Gregory Furlong (@gnfzdz)
|
||||||
|
@ -20,18 +19,15 @@ author:
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
- community.general.attributes.info_module
|
- community.general.attributes.info_module
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
|
||||||
|
|
||||||
|
EXAMPLES = r"""
|
||||||
- name: Query information about mounted btrfs filesystems
|
- name: Query information about mounted btrfs filesystems
|
||||||
community.general.btrfs_info:
|
community.general.btrfs_info:
|
||||||
register: my_btrfs_info
|
register: my_btrfs_info
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
RETURN = r"""
|
||||||
|
|
||||||
RETURN = r'''
|
|
||||||
|
|
||||||
filesystems:
|
filesystems:
|
||||||
description: Summaries of the current state for all btrfs filesystems found on the target host.
|
description: Summaries of the current state for all btrfs filesystems found on the target host.
|
||||||
type: list
|
type: list
|
||||||
|
@ -77,8 +73,7 @@ filesystems:
|
||||||
description: The full path of the subvolume relative to the btrfs fileystem's root.
|
description: The full path of the subvolume relative to the btrfs fileystem's root.
|
||||||
type: str
|
type: str
|
||||||
sample: /@home
|
sample: /@home
|
||||||
|
"""
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.btrfs import BtrfsFilesystemsProvider
|
from ansible_collections.community.general.plugins.module_utils.btrfs import BtrfsFilesystemsProvider
|
||||||
|
|
|
@ -7,8 +7,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: btrfs_subvolume
|
module: btrfs_subvolume
|
||||||
short_description: Manage btrfs subvolumes
|
short_description: Manage btrfs subvolumes
|
||||||
version_added: "6.6.0"
|
version_added: "6.6.0"
|
||||||
|
@ -18,7 +17,8 @@ description: Creates, updates and deletes btrfs subvolumes and snapshots.
|
||||||
options:
|
options:
|
||||||
automount:
|
automount:
|
||||||
description:
|
description:
|
||||||
- Allow the module to temporarily mount the targeted btrfs filesystem in order to validate the current state and make any required changes.
|
- Allow the module to temporarily mount the targeted btrfs filesystem in order to validate the current state and make
|
||||||
|
any required changes.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
default:
|
default:
|
||||||
|
@ -48,8 +48,8 @@ options:
|
||||||
type: str
|
type: str
|
||||||
recursive:
|
recursive:
|
||||||
description:
|
description:
|
||||||
- When true, indicates that parent/child subvolumes should be created/removedas necessary
|
- When true, indicates that parent/child subvolumes should be created/removedas necessary to complete the operation
|
||||||
to complete the operation (for O(state=present) and O(state=absent) respectively).
|
(for O(state=present) and O(state=absent) respectively).
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
snapshot_source:
|
snapshot_source:
|
||||||
|
@ -60,12 +60,13 @@ options:
|
||||||
snapshot_conflict:
|
snapshot_conflict:
|
||||||
description:
|
description:
|
||||||
- Policy defining behavior when a subvolume already exists at the path of the requested snapshot.
|
- Policy defining behavior when a subvolume already exists at the path of the requested snapshot.
|
||||||
- V(skip) - Create a snapshot only if a subvolume does not yet exist at the target location, otherwise indicate that no change is required.
|
- V(skip) - Create a snapshot only if a subvolume does not yet exist at the target location, otherwise indicate that
|
||||||
Warning, this option does not yet verify that the target subvolume was generated from a snapshot of the requested source.
|
no change is required. Warning, this option does not yet verify that the target subvolume was generated from a snapshot
|
||||||
- V(clobber) - If a subvolume already exists at the requested location, delete it first.
|
of the requested source.
|
||||||
This option is not idempotent and will result in a new snapshot being generated on every execution.
|
- V(clobber) - If a subvolume already exists at the requested location, delete it first. This option is not idempotent
|
||||||
- V(error) - If a subvolume already exists at the requested location, return an error.
|
and will result in a new snapshot being generated on every execution.
|
||||||
This option is not idempotent and will result in an error on replay of the module.
|
- V(error) - If a subvolume already exists at the requested location, return an error. This option is not idempotent
|
||||||
|
and will result in an error on replay of the module.
|
||||||
type: str
|
type: str
|
||||||
choices: [skip, clobber, error]
|
choices: [skip, clobber, error]
|
||||||
default: skip
|
default: skip
|
||||||
|
@ -77,10 +78,10 @@ options:
|
||||||
default: present
|
default: present
|
||||||
|
|
||||||
notes:
|
notes:
|
||||||
- If any or all of the options O(filesystem_device), O(filesystem_label) or O(filesystem_uuid) parameters are provided, there is expected
|
- If any or all of the options O(filesystem_device), O(filesystem_label) or O(filesystem_uuid) parameters are provided,
|
||||||
to be a matching btrfs filesystem. If none are provided and only a single btrfs filesystem exists or only a single
|
there is expected to be a matching btrfs filesystem. If none are provided and only a single btrfs filesystem exists or
|
||||||
btrfs filesystem is mounted, that filesystem will be used; otherwise, the module will take no action and return an error.
|
only a single btrfs filesystem is mounted, that filesystem will be used; otherwise, the module will take no action and
|
||||||
|
return an error.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
|
||||||
|
@ -88,17 +89,16 @@ attributes:
|
||||||
check_mode:
|
check_mode:
|
||||||
support: partial
|
support: partial
|
||||||
details:
|
details:
|
||||||
- In some scenarios it may erroneously report intermediate subvolumes being created.
|
- In some scenarios it may erroneously report intermediate subvolumes being created. After mounting, if a directory
|
||||||
After mounting, if a directory like file is found where the subvolume would have been created, the operation is skipped.
|
like file is found where the subvolume would have been created, the operation is skipped.
|
||||||
diff_mode:
|
diff_mode:
|
||||||
support: none
|
support: none
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- Gregory Furlong (@gnfzdz)
|
- Gregory Furlong (@gnfzdz)
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
|
||||||
|
|
||||||
|
EXAMPLES = r"""
|
||||||
- name: Create a @home subvolume under the root subvolume
|
- name: Create a @home subvolume under the root subvolume
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
name: /@home
|
name: /@home
|
||||||
|
@ -127,20 +127,18 @@ EXAMPLES = r'''
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
name: /@snapshots/@2022_06_09
|
name: /@snapshots/@2022_06_09
|
||||||
snapshot_source: /@
|
snapshot_source: /@
|
||||||
recursive: True
|
recursive: true
|
||||||
filesystem_device: /dev/vda2
|
filesystem_device: /dev/vda2
|
||||||
|
|
||||||
- name: Remove the /@ subvolume and recursively delete child subvolumes as required
|
- name: Remove the /@ subvolume and recursively delete child subvolumes as required
|
||||||
community.general.btrfs_subvolume:
|
community.general.btrfs_subvolume:
|
||||||
name: /@snapshots/@2022_06_09
|
name: /@snapshots/@2022_06_09
|
||||||
snapshot_source: /@
|
snapshot_source: /@
|
||||||
recursive: True
|
recursive: true
|
||||||
filesystem_device: /dev/vda2
|
filesystem_device: /dev/vda2
|
||||||
|
"""
|
||||||
|
|
||||||
'''
|
RETURN = r"""
|
||||||
|
|
||||||
RETURN = r'''
|
|
||||||
|
|
||||||
filesystem:
|
filesystem:
|
||||||
description:
|
description:
|
||||||
- A summary of the final state of the targeted btrfs filesystem.
|
- A summary of the final state of the targeted btrfs filesystem.
|
||||||
|
@ -205,7 +203,7 @@ target_subvolume_id:
|
||||||
type: int
|
type: int
|
||||||
sample: 257
|
sample: 257
|
||||||
returned: Success and subvolume exists after module execution
|
returned: Success and subvolume exists after module execution
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.btrfs import BtrfsFilesystemsProvider, BtrfsCommands, BtrfsModuleException
|
from ansible_collections.community.general.plugins.module_utils.btrfs import BtrfsFilesystemsProvider, BtrfsCommands, BtrfsModuleException
|
||||||
from ansible_collections.community.general.plugins.module_utils.btrfs import normalize_subvolume_path
|
from ansible_collections.community.general.plugins.module_utils.btrfs import normalize_subvolume_path
|
||||||
|
|
|
@ -9,12 +9,11 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: bundler
|
module: bundler
|
||||||
short_description: Manage Ruby Gem dependencies with Bundler
|
short_description: Manage Ruby Gem dependencies with Bundler
|
||||||
description:
|
description:
|
||||||
- Manage installation and Gem version dependencies for Ruby using the Bundler gem
|
- Manage installation and Gem version dependencies for Ruby using the Bundler gem.
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -26,80 +25,72 @@ options:
|
||||||
executable:
|
executable:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The path to the bundler executable
|
- The path to the bundler executable.
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The desired state of the Gem bundle. V(latest) updates gems to the most recent, acceptable version
|
- The desired state of the Gem bundle. V(latest) updates gems to the most recent, acceptable version.
|
||||||
choices: [present, latest]
|
choices: [present, latest]
|
||||||
default: present
|
default: present
|
||||||
chdir:
|
chdir:
|
||||||
type: path
|
type: path
|
||||||
description:
|
description:
|
||||||
- The directory to execute the bundler commands from. This directory
|
- The directory to execute the bundler commands from. This directory needs to contain a valid Gemfile or .bundle/ directory.
|
||||||
needs to contain a valid Gemfile or .bundle/ directory
|
- If not specified, it will default to the temporary working directory.
|
||||||
- If not specified, it will default to the temporary working directory
|
|
||||||
exclude_groups:
|
exclude_groups:
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
description:
|
description:
|
||||||
- A list of Gemfile groups to exclude during operations. This only
|
- A list of Gemfile groups to exclude during operations. This only applies when O(state=present). Bundler considers
|
||||||
applies when O(state=present). Bundler considers this
|
this a 'remembered' property for the Gemfile and will automatically exclude groups in future operations even if O(exclude_groups)
|
||||||
a 'remembered' property for the Gemfile and will automatically exclude
|
is not set.
|
||||||
groups in future operations even if O(exclude_groups) is not set
|
|
||||||
clean:
|
clean:
|
||||||
description:
|
description:
|
||||||
- Only applies if O(state=present). If set removes any gems on the
|
- Only applies if O(state=present). If set removes any gems on the target host that are not in the gemfile.
|
||||||
target host that are not in the gemfile
|
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
gemfile:
|
gemfile:
|
||||||
type: path
|
type: path
|
||||||
description:
|
description:
|
||||||
- Only applies if O(state=present). The path to the gemfile to use to install gems.
|
- Only applies if O(state=present). The path to the gemfile to use to install gems.
|
||||||
- If not specified it will default to the Gemfile in current directory
|
- If not specified it will default to the Gemfile in current directory.
|
||||||
local:
|
local:
|
||||||
description:
|
description:
|
||||||
- If set only installs gems from the cache on the target host
|
- If set only installs gems from the cache on the target host.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
deployment_mode:
|
deployment_mode:
|
||||||
description:
|
description:
|
||||||
- Only applies if O(state=present). If set it will install gems in
|
- Only applies if O(state=present). If set it will install gems in C(./vendor/bundle) instead of the default location.
|
||||||
./vendor/bundle instead of the default location. Requires a Gemfile.lock
|
Requires a C(Gemfile.lock) file to have been created prior.
|
||||||
file to have been created prior
|
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
user_install:
|
user_install:
|
||||||
description:
|
description:
|
||||||
- Only applies if O(state=present). Installs gems in the local user's cache or for all users
|
- Only applies if O(state=present). Installs gems in the local user's cache or for all users.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
gem_path:
|
gem_path:
|
||||||
type: path
|
type: path
|
||||||
description:
|
description:
|
||||||
- Only applies if O(state=present). Specifies the directory to
|
- Only applies if O(state=present). Specifies the directory to install the gems into. If O(chdir) is set then this path
|
||||||
install the gems into. If O(chdir) is set then this path is relative to
|
is relative to O(chdir).
|
||||||
O(chdir)
|
|
||||||
- If not specified the default RubyGems gem paths will be used.
|
- If not specified the default RubyGems gem paths will be used.
|
||||||
binstub_directory:
|
binstub_directory:
|
||||||
type: path
|
type: path
|
||||||
description:
|
description:
|
||||||
- Only applies if O(state=present). Specifies the directory to
|
- Only applies if O(state=present). Specifies the directory to install any gem bins files to. When executed the bin
|
||||||
install any gem bins files to. When executed the bin files will run
|
files will run within the context of the Gemfile and fail if any required gem dependencies are not installed. If O(chdir)
|
||||||
within the context of the Gemfile and fail if any required gem
|
is set then this path is relative to O(chdir).
|
||||||
dependencies are not installed. If O(chdir) is set then this path is
|
|
||||||
relative to O(chdir)
|
|
||||||
extra_args:
|
extra_args:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- A space separated string of additional commands that can be applied to
|
- A space separated string of additional commands that can be applied to the Bundler command. Refer to the Bundler documentation
|
||||||
the Bundler command. Refer to the Bundler documentation for more
|
for more information.
|
||||||
information
|
|
||||||
author: "Tim Hoiberg (@thoiberg)"
|
author: "Tim Hoiberg (@thoiberg)"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Install gems from a Gemfile in the current directory
|
- name: Install gems from a Gemfile in the current directory
|
||||||
community.general.bundler:
|
community.general.bundler:
|
||||||
state: present
|
state: present
|
||||||
|
@ -124,7 +115,7 @@ EXAMPLES = '''
|
||||||
community.general.bundler:
|
community.general.bundler:
|
||||||
state: latest
|
state: latest
|
||||||
chdir: ~/rails_project
|
chdir: ~/rails_project
|
||||||
'''
|
"""
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: bzr
|
module: bzr
|
||||||
author:
|
author:
|
||||||
- André Paramés (@andreparames)
|
- André Paramés (@andreparames)
|
||||||
|
@ -38,30 +37,27 @@ options:
|
||||||
type: path
|
type: path
|
||||||
version:
|
version:
|
||||||
description:
|
description:
|
||||||
- What version of the branch to clone. This can be the
|
- What version of the branch to clone. This can be the bzr revno or revid.
|
||||||
bzr revno or revid.
|
|
||||||
default: head
|
default: head
|
||||||
type: str
|
type: str
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
- If V(true), any modified files in the working
|
- If V(true), any modified files in the working tree will be discarded.
|
||||||
tree will be discarded.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
executable:
|
executable:
|
||||||
description:
|
description:
|
||||||
- Path to bzr executable to use. If not supplied,
|
- Path to bzr executable to use. If not supplied, the normal mechanism for resolving binary paths will be used.
|
||||||
the normal mechanism for resolving binary paths will be used.
|
|
||||||
type: str
|
type: str
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r"""
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
community.general.bzr:
|
community.general.bzr:
|
||||||
name: bzr+ssh://foosball.example.org/path/to/branch
|
name: bzr+ssh://foosball.example.org/path/to/branch
|
||||||
dest: /srv/checkout
|
dest: /srv/checkout
|
||||||
version: 22
|
version: 22
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue