[pi ... prof]*: normalize docs (#9371)

* [pi ... prof]*: normalize docs

* Update plugins/modules/pkg5_publisher.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/9101/merge
Alexei Znamensky 2024-12-26 10:48:04 +13:00 committed by GitHub
parent 23d97fa4b0
commit 13e2097f37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 702 additions and 766 deletions

View File

@ -7,9 +7,10 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
module: pids module: pids
description: "Retrieves a list of PIDs of given process name in Ansible controller/controlled machines.Returns an empty list if no process in that name exists." description: "Retrieves a list of PIDs of given process name in Ansible controller/controlled machines.Returns an empty list if no process in
that name exists."
short_description: Retrieves process IDs list if the process is running otherwise return empty list short_description: Retrieves process IDs list if the process is running otherwise return empty list
author: author:
- Saranya Sridharan (@saranyasridharan) - Saranya Sridharan (@saranyasridharan)
@ -35,13 +36,13 @@ options:
type: bool type: bool
default: false default: false
version_added: 3.0.0 version_added: 3.0.0
''' """
EXAMPLES = r''' EXAMPLES = r"""
# Pass the process name # Pass the process name
- name: Getting process IDs of the process - name: Getting process IDs of the process
community.general.pids: community.general.pids:
name: python name: python
register: pids_of_python register: pids_of_python
- name: Printing the process IDs obtained - name: Printing the process IDs obtained
@ -52,15 +53,15 @@ EXAMPLES = r'''
community.general.pids: community.general.pids:
pattern: python(2(\.7)?|3(\.6)?)?\s+myapp\.py pattern: python(2(\.7)?|3(\.6)?)?\s+myapp\.py
register: myapp_pids register: myapp_pids
''' """
RETURN = ''' RETURN = r"""
pids: pids:
description: Process IDs of the given process description: Process IDs of the given process.
returned: list of none, one, or more process IDs returned: list of none, one, or more process IDs
type: list type: list
sample: [100,200] sample: [100, 200]
''' """
import abc import abc
import re import re

View File

@ -8,56 +8,55 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
module: pingdom module: pingdom
short_description: Pause/unpause Pingdom alerts short_description: Pause/unpause Pingdom alerts
description: description:
- This module will let you pause/unpause Pingdom alerts - This module will let you pause/unpause Pingdom alerts.
author: author:
- "Dylan Silva (@thaumos)" - "Dylan Silva (@thaumos)"
- "Justin Johns (!UNKNOWN)" - "Justin Johns (!UNKNOWN)"
requirements: requirements:
- "This pingdom python library: https://github.com/mbabineau/pingdom-python" - "This pingdom python library: U(https://github.com/mbabineau/pingdom-python)"
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
state: state:
type: str type: str
description: description:
- Define whether or not the check should be running or paused. - Define whether or not the check should be running or paused.
required: true required: true
choices: [ "running", "paused", "started", "stopped" ] choices: ["running", "paused", "started", "stopped"]
checkid: checkid:
type: str type: str
description: description:
- Pingdom ID of the check. - Pingdom ID of the check.
required: true required: true
uid: uid:
type: str type: str
description: description:
- Pingdom user ID. - Pingdom user ID.
required: true required: true
passwd: passwd:
type: str type: str
description: description:
- Pingdom user password. - Pingdom user password.
required: true required: true
key: key:
type: str type: str
description: description:
- Pingdom API key. - Pingdom API key.
required: true required: true
notes: notes:
- This module does not yet have support to add/remove checks. - This module does not yet have support to add/remove checks.
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Pause the check with the ID of 12345 - name: Pause the check with the ID of 12345
community.general.pingdom: community.general.pingdom:
uid: example@example.com uid: example@example.com
@ -73,7 +72,7 @@ EXAMPLES = '''
key: apipassword123 key: apipassword123
checkid: 12345 checkid: 12345
state: running state: running
''' """
import traceback import traceback

View File

@ -9,33 +9,33 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
module: pip_package_info module: pip_package_info
short_description: Pip package information short_description: Pip package information
description: description:
- Return information about installed pip packages - Return information about installed pip packages.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
options: options:
clients: clients:
description: description:
- A list of the pip executables that will be used to get the packages. - A list of the pip executables that will be used to get the packages. They can be supplied with the full path or just the executable name,
They can be supplied with the full path or just the executable name, for example V(pip3.7). for example V(pip3.7).
default: ['pip'] default: ['pip']
required: false required: false
type: list type: list
elements: path elements: path
requirements: requirements:
- pip >= 20.3b1 (necessary for the C(--format) option) - pip >= 20.3b1 (necessary for the C(--format) option)
- The requested pip executables must be installed on the target. - The requested C(pip) executables must be installed on the target.
author: author:
- Matthew Jones (@matburt) - Matthew Jones (@matburt)
- Brian Coca (@bcoca) - Brian Coca (@bcoca)
- Adam Miller (@maxamillion) - Adam Miller (@maxamillion)
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Just get the list from default pip - name: Just get the list from default pip
community.general.pip_package_info: community.general.pip_package_info:
@ -46,16 +46,16 @@ EXAMPLES = '''
- name: Get from specific paths (virtualenvs?) - name: Get from specific paths (virtualenvs?)
community.general.pip_package_info: community.general.pip_package_info:
clients: '/home/me/projec42/python/pip3.5' clients: '/home/me/projec42/python/pip3.5'
''' """
RETURN = ''' RETURN = r"""
packages: packages:
description: a dictionary of installed package data description: A dictionary of installed package data.
returned: always returned: always
type: dict type: dict
contains: contains:
python: python:
description: A dictionary with each pip client which then contains a list of dicts with python package information description: A dictionary with each pip client which then contains a list of dicts with python package information.
returned: always returned: always
type: dict type: dict
sample: sample:
@ -91,7 +91,8 @@ packages:
], ],
}, },
} }
''' """
import json import json
import os import os

View File

@ -9,16 +9,15 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = """ DOCUMENTATION = r"""
---
module: pipx module: pipx
short_description: Manages applications installed with pipx short_description: Manages applications installed with pipx
version_added: 3.8.0 version_added: 3.8.0
description: description:
- Manage Python applications installed in isolated virtualenvs using pipx. - Manage Python applications installed in isolated virtualenvs using pipx.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
- community.general.pipx - community.general.pipx
attributes: attributes:
check_mode: check_mode:
support: full support: full
@ -28,131 +27,128 @@ options:
state: state:
type: str type: str
choices: choices:
- present - present
- absent - absent
- install - install
- install_all - install_all
- uninstall - uninstall
- uninstall_all - uninstall_all
- inject - inject
- uninject - uninject
- upgrade - upgrade
- upgrade_shared - upgrade_shared
- upgrade_all - upgrade_all
- reinstall - reinstall
- reinstall_all - reinstall_all
- latest - latest
- pin - pin
- unpin - unpin
default: install default: install
description: description:
- Desired state for the application. - Desired state for the application.
- The states V(present) and V(absent) are aliases to V(install) and V(uninstall), respectively. - The states V(present) and V(absent) are aliases to V(install) and V(uninstall), respectively.
- The state V(latest) is equivalent to executing the task twice, with state V(install) and then V(upgrade). It was added in community.general - The state V(latest) is equivalent to executing the task twice, with state V(install) and then V(upgrade). It was added in community.general
5.5.0. 5.5.0.
- The states V(install_all), V(uninject), V(upgrade_shared), V(pin) and V(unpin) are only available in C(pipx>=1.6.0), make sure to have a - The states V(install_all), V(uninject), V(upgrade_shared), V(pin) and V(unpin) are only available in C(pipx>=1.6.0), make sure to have
compatible version when using this option. These states have been added in community.general 9.4.0. a compatible version when using this option. These states have been added in community.general 9.4.0.
name: name:
type: str type: str
description: description:
- The name of the application. In C(pipx) documentation it is also referred to as the name of the virtual environment where the application - The name of the application. In C(pipx) documentation it is also referred to as the name of the virtual environment where the application
will be installed. will be installed.
- If O(name) is a simple package name without version specifiers, then that name is used as the Python package name to be installed. - If O(name) is a simple package name without version specifiers, then that name is used as the Python package name to be installed.
- Use O(source) for passing package specifications or installing from URLs or directories. - Use O(source) for passing package specifications or installing from URLs or directories.
source: source:
type: str type: str
description: description:
- Source for the package. This option is used when O(state=install) or O(state=latest), and it is ignored with other states. - Source for the package. This option is used when O(state=install) or O(state=latest), and it is ignored with other states.
- Use O(source) when installing a Python package with version specifier, or from a local path, from a VCS URL or compressed file. - Use O(source) when installing a Python package with version specifier, or from a local path, from a VCS URL or compressed file.
- The value of this option is passed as-is to C(pipx). - The value of this option is passed as-is to C(pipx).
- O(name) is still required when using O(source) to establish the application name without fetching the package from a remote source. - O(name) is still required when using O(source) to establish the application name without fetching the package from a remote source.
install_apps: install_apps:
description: description:
- Add apps from the injected packages. - Add apps from the injected packages.
- Only used when O(state=inject). - Only used when O(state=inject).
type: bool type: bool
default: false default: false
version_added: 6.5.0 version_added: 6.5.0
install_deps: install_deps:
description: description:
- Include applications of dependent packages. - Include applications of dependent packages.
- Only used when O(state=install), O(state=latest), or O(state=inject). - Only used when O(state=install), O(state=latest), or O(state=inject).
type: bool type: bool
default: false default: false
inject_packages: inject_packages:
description: description:
- Packages to be injected into an existing virtual environment. - Packages to be injected into an existing virtual environment.
- Only used when O(state=inject). - Only used when O(state=inject).
type: list type: list
elements: str elements: str
force: force:
description: description:
- Force modification of the application's virtual environment. See C(pipx) for details. - Force modification of the application's virtual environment. See C(pipx) for details.
- Only used when O(state=install), O(state=upgrade), O(state=upgrade_all), O(state=latest), or O(state=inject). - Only used when O(state=install), O(state=upgrade), O(state=upgrade_all), O(state=latest), or O(state=inject).
type: bool type: bool
default: false default: false
include_injected: include_injected:
description: description:
- Upgrade the injected packages along with the application. - Upgrade the injected packages along with the application.
- Only used when O(state=upgrade), O(state=upgrade_all), or O(state=latest). - Only used when O(state=upgrade), O(state=upgrade_all), or O(state=latest).
- This is used with O(state=upgrade) and O(state=latest) since community.general 6.6.0. - This is used with O(state=upgrade) and O(state=latest) since community.general 6.6.0.
type: bool type: bool
default: false default: false
index_url: index_url:
description: description:
- Base URL of Python Package Index. - Base URL of Python Package Index.
- Only used when O(state=install), O(state=upgrade), O(state=latest), or O(state=inject). - Only used when O(state=install), O(state=upgrade), O(state=latest), or O(state=inject).
type: str type: str
python: python:
description: description:
- Python version to be used when creating the application virtual environment. Must be 3.6+. - Python version to be used when creating the application virtual environment. Must be 3.6+.
- Only used when O(state=install), O(state=latest), O(state=reinstall), or O(state=reinstall_all). - Only used when O(state=install), O(state=latest), O(state=reinstall), or O(state=reinstall_all).
type: str type: str
system_site_packages: system_site_packages:
description: description:
- Give application virtual environment access to the system site-packages directory. - Give application virtual environment access to the system site-packages directory.
- Only used when O(state=install) or O(state=latest). - Only used when O(state=install) or O(state=latest).
type: bool type: bool
default: false default: false
version_added: 6.6.0 version_added: 6.6.0
editable: editable:
description: description:
- Install the project in editable mode. - Install the project in editable mode.
type: bool type: bool
default: false default: false
version_added: 4.6.0 version_added: 4.6.0
pip_args: pip_args:
description: description:
- Arbitrary arguments to pass directly to C(pip). - Arbitrary arguments to pass directly to C(pip).
type: str type: str
version_added: 4.6.0 version_added: 4.6.0
suffix: suffix:
description: description:
- Optional suffix for virtual environment and executable names. - Optional suffix for virtual environment and executable names.
- "B(Warning:) C(pipx) documentation states this is an B(experimental) feature subject to change." - B(Warning:) C(pipx) documentation states this is an B(experimental) feature subject to change.
type: str type: str
version_added: 9.3.0 version_added: 9.3.0
global: global:
version_added: 9.4.0 version_added: 9.4.0
spec_metadata: spec_metadata:
description: description:
- Spec metadata file for O(state=install_all). - Spec metadata file for O(state=install_all).
- This content of the file is usually generated with C(pipx list --json), and it can be obtained with M(community.general.pipx_info) with - This content of the file is usually generated with C(pipx list --json), and it can be obtained with M(community.general.pipx_info) with
O(community.general.pipx_info#module:include_raw=true) and obtaining the content from the RV(community.general.pipx_info#module:raw_output). O(community.general.pipx_info#module:include_raw=true) and obtaining the content from the RV(community.general.pipx_info#module:raw_output).
type: path type: path
version_added: 9.4.0 version_added: 9.4.0
notes: notes:
- > - This first implementation does not verify whether a specified version constraint has been installed or not. Hence, when using version operators,
This first implementation does not verify whether a specified version constraint has been installed or not. C(pipx) module will always try to execute the operation, even when the application was previously installed. This feature will be added in
Hence, when using version operators, C(pipx) module will always try to execute the operation, the future.
even when the application was previously installed.
This feature will be added in the future.
author: author:
- "Alexei Znamensky (@russoz)" - "Alexei Znamensky (@russoz)"
""" """
EXAMPLES = """ EXAMPLES = r"""
---
- name: Install tox - name: Install tox
community.general.pipx: community.general.pipx:
name: tox name: tox
@ -181,16 +177,16 @@ EXAMPLES = """
- name: Install multiple packages from list - name: Install multiple packages from list
vars: vars:
pipx_packages: pipx_packages:
- pycowsay - pycowsay
- black - black
- tox - tox
community.general.pipx: community.general.pipx:
name: "{{ item }}" name: "{{ item }}"
state: latest state: latest
with_items: "{{ pipx_packages }}" with_items: "{{ pipx_packages }}"
""" """
RETURN = """ RETURN = r"""
version: version:
description: Version of pipx. description: Version of pipx.
type: str type: str

View File

@ -9,46 +9,44 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = """ DOCUMENTATION = r"""
---
module: pipx_info module: pipx_info
short_description: Rretrieves information about applications installed with pipx short_description: Rretrieves information about applications installed with pipx
version_added: 5.6.0 version_added: 5.6.0
description: description:
- Retrieve details about Python applications installed in isolated virtualenvs using pipx. - Retrieve details about Python applications installed in isolated virtualenvs using pipx.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
- community.general.pipx - community.general.pipx
options: options:
name: name:
description: description:
- Name of an application installed with C(pipx). - Name of an application installed with C(pipx).
type: str type: str
include_deps: include_deps:
description: description:
- Include dependent packages in the output. - Include dependent packages in the output.
type: bool type: bool
default: false default: false
include_injected: include_injected:
description: description:
- Include injected packages in the output. - Include injected packages in the output.
type: bool type: bool
default: false default: false
include_raw: include_raw:
description: description:
- Returns the raw output of C(pipx list --json). - Returns the raw output of C(pipx list --json).
- The raw output is not affected by O(include_deps) or O(include_injected). - The raw output is not affected by O(include_deps) or O(include_injected).
type: bool type: bool
default: false default: false
global: global:
version_added: 9.3.0 version_added: 9.3.0
author: author:
- "Alexei Znamensky (@russoz)" - "Alexei Znamensky (@russoz)"
""" """
EXAMPLES = """ EXAMPLES = r"""
---
- name: retrieve all installed applications - name: retrieve all installed applications
community.general.pipx_info: {} community.general.pipx_info: {}
@ -68,10 +66,9 @@ EXAMPLES = """
include_deps: true include_deps: true
""" """
RETURN = """ RETURN = r"""
---
application: application:
description: The list of installed applications description: The list of installed applications.
returned: success returned: success
type: list type: list
elements: dict elements: dict
@ -100,8 +97,8 @@ application:
licenses: "0.6.1" licenses: "0.6.1"
pinned: pinned:
description: description:
- Whether the installed application is pinned or not. - Whether the installed application is pinned or not.
- When using C(pipx<=1.6.0), this returns C(null). - When using C(pipx<=1.6.0), this returns C(null).
returned: success returned: success
type: bool type: bool
sample: sample:

View File

@ -8,11 +8,10 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: pkg5 module: pkg5
author: author:
- Peter Oliver (@mavit) - Peter Oliver (@mavit)
short_description: Manages packages with the Solaris 11 Image Packaging System short_description: Manages packages with the Solaris 11 Image Packaging System
description: description:
- IPS packages are the native packages in Solaris 11 and higher. - IPS packages are the native packages in Solaris 11 and higher.
@ -36,7 +35,7 @@ options:
state: state:
description: description:
- Whether to install (V(present), V(latest)), or remove (V(absent)) a package. - Whether to install (V(present), V(latest)), or remove (V(absent)) a package.
choices: [ absent, latest, present, installed, removed, uninstalled ] choices: [absent, latest, present, installed, removed, uninstalled]
default: present default: present
type: str type: str
accept_licenses: accept_licenses:
@ -44,7 +43,7 @@ options:
- Accept any licences. - Accept any licences.
type: bool type: bool
default: false default: false
aliases: [ accept, accept_licences ] aliases: [accept, accept_licences]
be_name: be_name:
description: description:
- Creates a new boot environment with the given name. - Creates a new boot environment with the given name.
@ -60,8 +59,8 @@ options:
type: bool type: bool
default: false default: false
version_added: 9.0.0 version_added: 9.0.0
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Install Vim - name: Install Vim
community.general.pkg5: community.general.pkg5:
name: editor/vim name: editor/vim
@ -79,9 +78,9 @@ EXAMPLES = '''
- name: Install several packages at once - name: Install several packages at once
community.general.pkg5: community.general.pkg5:
name: name:
- /file/gnu-findutils - /file/gnu-findutils
- /text/gnu-grep - /text/gnu-grep
''' """
import re import re

View File

@ -10,15 +10,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: pkg5_publisher module: pkg5_publisher
author: "Peter Oliver (@mavit)" author: "Peter Oliver (@mavit)"
short_description: Manages Solaris 11 Image Packaging System publishers short_description: Manages Solaris 11 Image Packaging System publishers
description: description:
- IPS packages are the native packages in Solaris 11 and higher. - IPS packages are the native packages in Solaris 11 and higher.
- This modules will configure which publishers a client will download IPS - This modules will configure which publishers a client will download IPS packages from.
packages from.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -31,18 +29,17 @@ options:
description: description:
- The publisher's name. - The publisher's name.
required: true required: true
aliases: [ publisher ] aliases: [publisher]
type: str type: str
state: state:
description: description:
- Whether to ensure that a publisher is present or absent. - Whether to ensure that a publisher is present or absent.
default: present default: present
choices: [ present, absent ] choices: [present, absent]
type: str type: str
sticky: sticky:
description: description:
- Packages installed from a sticky repository can only receive updates - Packages installed from a sticky repository can only receive updates from that repository.
from that repository.
type: bool type: bool
enabled: enabled:
description: description:
@ -60,8 +57,8 @@ options:
- Multiple values may be provided. - Multiple values may be provided.
type: list type: list
elements: str elements: str
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Fetch packages for the solaris publisher direct from Oracle - name: Fetch packages for the solaris publisher direct from Oracle
community.general.pkg5_publisher: community.general.pkg5_publisher:
name: solaris name: solaris
@ -72,7 +69,7 @@ EXAMPLES = '''
community.general.pkg5_publisher: community.general.pkg5_publisher:
name: site name: site
origin: 'https://pkg.example.com/site/' origin: 'https://pkg.example.com/site/'
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -16,70 +16,66 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: pkgin module: pkgin
short_description: Package manager for SmartOS, NetBSD, et al short_description: Package manager for SmartOS, NetBSD, et al
description: description:
- "The standard package manager for SmartOS, but also usable on NetBSD - 'The standard package manager for SmartOS, but also usable on NetBSD or any OS that uses C(pkgsrc). (Home: U(http://pkgin.net/)).'
or any OS that uses C(pkgsrc). (Home: U(http://pkgin.net/))"
author: author:
- "Larry Gilbert (@L2G)" - "Larry Gilbert (@L2G)"
- "Shaun Zinck (@szinck)" - "Shaun Zinck (@szinck)"
- "Jasper Lievisse Adriaanse (@jasperla)" - "Jasper Lievisse Adriaanse (@jasperla)"
notes: notes:
- "Known bug with pkgin < 0.8.0: if a package is removed and another - 'Known bug with pkgin < 0.8.0: if a package is removed and another package depends on it, the other package will be silently removed as well.'
package depends on it, the other package will be silently removed as
well."
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: full support: full
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
description: description:
- Name of package to install/remove; - Name of package to install/remove;
- multiple names may be given, separated by commas - Multiple names may be given, separated by commas.
aliases: [pkg] aliases: [pkg]
type: list type: list
elements: str elements: str
state: state:
description: description:
- Intended state of the package - Intended state of the package.
choices: [ 'present', 'absent' ] choices: ['present', 'absent']
default: present default: present
type: str type: str
update_cache: update_cache:
description: description:
- Update repository database. Can be run with other steps or on it's own. - Update repository database. Can be run with other steps or on it's own.
type: bool type: bool
default: false default: false
upgrade: upgrade:
description: description:
- Upgrade main packages to their newer versions - Upgrade main packages to their newer versions.
type: bool type: bool
default: false default: false
full_upgrade: full_upgrade:
description: description:
- Upgrade all packages to their newer versions - Upgrade all packages to their newer versions.
type: bool type: bool
default: false default: false
clean: clean:
description: description:
- Clean packages cache - Clean packages cache.
type: bool type: bool
default: false default: false
force: force:
description: description:
- Force package reinstall - Force package reinstall.
type: bool type: bool
default: false default: false
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Install package foo - name: Install package foo
community.general.pkgin: community.general.pkgin:
name: foo name: foo
@ -125,7 +121,7 @@ EXAMPLES = '''
- name: Clean packages cache (equivalent to pkgin clean) - name: Clean packages cache (equivalent to pkgin clean)
community.general.pkgin: community.general.pkgin:
clean: true clean: true
''' """
import re import re

View File

@ -14,107 +14,100 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: pkgng module: pkgng
short_description: Package manager for FreeBSD >= 9.0 short_description: Package manager for FreeBSD >= 9.0
description: description:
- Manage binary packages for FreeBSD using 'pkgng' which is available in versions after 9.0. - Manage binary packages for FreeBSD using C(pkgng) which is available in versions after 9.0.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: full support: full
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
description: description:
- Name or list of names of packages to install/remove. - Name or list of names of packages to install/remove.
- "With O(name=*), O(state=latest) will operate, but O(state=present) and O(state=absent) will be noops." - With O(name=*), O(state=latest) will operate, but O(state=present) and O(state=absent) will be noops.
required: true required: true
aliases: [pkg] aliases: [pkg]
type: list type: list
elements: str elements: str
state: state:
description: description:
- State of the package. - State of the package.
choices: [ 'present', 'latest', 'absent' ] choices: ['present', 'latest', 'absent']
required: false required: false
default: present default: present
type: str type: str
cached: cached:
description: description:
- Use local package base instead of fetching an updated one. - Use local package base instead of fetching an updated one.
type: bool type: bool
required: false required: false
default: false default: false
annotation: annotation:
description: description:
- A list of keyvalue-pairs of the form - A list of keyvalue-pairs of the form C(<+/-/:><key>[=<value>]). A V(+) denotes adding an annotation, a V(-) denotes removing an annotation,
C(<+/-/:><key>[=<value>]). A V(+) denotes adding an annotation, a and V(:) denotes modifying an annotation. If setting or modifying annotations, a value must be provided.
V(-) denotes removing an annotation, and V(:) denotes modifying an required: false
annotation. type: list
If setting or modifying annotations, a value must be provided. elements: str
required: false pkgsite:
type: list description:
elements: str - For C(pkgng) versions before 1.1.4, specify C(packagesite) to use for downloading packages.
pkgsite: If not specified, use settings from C(/usr/local/etc/pkg.conf).
description: - For newer C(pkgng) versions, specify a the name of a repository configured in C(/usr/local/etc/pkg/repos).
- For pkgng versions before 1.1.4, specify packagesite to use required: false
for downloading packages. If not specified, use settings from type: str
C(/usr/local/etc/pkg.conf). rootdir:
- For newer pkgng versions, specify a the name of a repository description:
configured in C(/usr/local/etc/pkg/repos). - For C(pkgng) versions 1.5 and later, pkg will install all packages within the specified root directory.
required: false - Can not be used together with O(chroot) or O(jail) options.
type: str required: false
rootdir: type: path
description: chroot:
- For pkgng versions 1.5 and later, pkg will install all packages description:
within the specified root directory. - Pkg will chroot in the specified environment.
- Can not be used together with O(chroot) or O(jail) options. - Can not be used together with O(rootdir) or O(jail) options.
required: false required: false
type: path type: path
chroot: jail:
description: description:
- Pkg will chroot in the specified environment. - Pkg will execute in the given jail name or id.
- Can not be used together with O(rootdir) or O(jail) options. - Can not be used together with O(chroot) or O(rootdir) options.
required: false type: str
type: path autoremove:
jail: description:
description: - Remove automatically installed packages which are no longer needed.
- Pkg will execute in the given jail name or id. required: false
- Can not be used together with O(chroot) or O(rootdir) options. type: bool
type: str default: false
autoremove: ignore_osver:
description: description:
- Remove automatically installed packages which are no longer needed. - Ignore FreeBSD OS version check, useful on C(-STABLE) and C(-CURRENT) branches.
required: false - Defines the E(IGNORE_OSVERSION) environment variable.
type: bool required: false
default: false type: bool
ignore_osver: default: false
description: version_added: 1.3.0
- Ignore FreeBSD OS version check, useful on -STABLE and -CURRENT branches. use_globs:
- Defines the E(IGNORE_OSVERSION) environment variable. description:
required: false - Treat the package names as shell glob patterns.
type: bool required: false
default: false type: bool
version_added: 1.3.0 default: true
use_globs: version_added: 9.3.0
description:
- Treat the package names as shell glob patterns.
required: false
type: bool
default: true
version_added: 9.3.0
author: "bleader (@bleader)" author: "bleader (@bleader)"
notes: notes:
- When using pkgsite, be careful that already in cache packages won't be downloaded again. - When using pkgsite, be careful that already in cache packages will not be downloaded again.
- When used with a C(loop:) each package will be processed individually, - 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)
it is much more efficient to pass the list directly to the O(name) option. option.
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Install package foo - name: Install package foo
community.general.pkgng: community.general.pkgng:
name: foo name: foo
@ -149,7 +142,7 @@ EXAMPLES = '''
name: foo/bar name: foo/bar
state: latest state: latest
use_globs: false use_globs: false
''' """
from collections import defaultdict from collections import defaultdict

View File

@ -12,19 +12,18 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: pkgutil module: pkgutil
short_description: OpenCSW package management on Solaris short_description: OpenCSW package management on Solaris
description: description:
- This module installs, updates and removes packages from the OpenCSW project for Solaris. - This module installs, updates and removes packages from the OpenCSW project for Solaris.
- Unlike the M(community.general.svr4pkg) module, it will resolve and download dependencies. - Unlike the M(community.general.svr4pkg) module, it will resolve and download dependencies.
- See U(https://www.opencsw.org/) for more information about the project. - See U(https://www.opencsw.org/) for more information about the project.
author: author:
- Alexander Winkler (@dermute) - Alexander Winkler (@dermute)
- David Ponessa (@scathatheworm) - David Ponessa (@scathatheworm)
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: full support: full
@ -35,40 +34,40 @@ attributes:
options: options:
name: name:
description: description:
- The name of the package. - The name of the package.
- When using O(state=latest), this can be V('*'), which updates all installed packages managed by pkgutil. - When using O(state=latest), this can be V('*'), which updates all installed packages managed by pkgutil.
type: list type: list
required: true required: true
elements: str elements: str
aliases: [ pkg ] aliases: [pkg]
site: site:
description: description:
- The repository path to install the package from. - The repository path to install the package from.
- Its global definition is in C(/etc/opt/csw/pkgutil.conf). - Its global definition is in C(/etc/opt/csw/pkgutil.conf).
required: false required: false
type: str type: str
state: state:
description: description:
- Whether to install (V(present)/V(installed)), or remove (V(absent)/V(removed)) packages. - Whether to install (V(present)/V(installed)), or remove (V(absent)/V(removed)) packages.
- The upgrade (V(latest)) operation will update/install the packages to the latest version available. - The upgrade (V(latest)) operation will update/install the packages to the latest version available.
type: str type: str
required: true required: true
choices: [ absent, installed, latest, present, removed ] choices: [absent, installed, latest, present, removed]
update_catalog: update_catalog:
description: description:
- If you always want to refresh your catalog from the mirror, even when it's not stale, set this to V(true). - If you always want to refresh your catalog from the mirror, even when it's not stale, set this to V(true).
type: bool type: bool
default: false default: false
force: force:
description: description:
- To allow the update process to downgrade packages to match what is present in the repository, set this to V(true). - To allow the update process to downgrade packages to match what is present in the repository, set this to V(true).
- This is useful for rolling back to stable from testing, or similar operations. - This is useful for rolling back to stable from testing, or similar operations.
type: bool type: bool
default: false default: false
version_added: 1.2.0 version_added: 1.2.0
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Install a package - name: Install a package
community.general.pkgutil: community.general.pkgutil:
name: CSWcommon name: CSWcommon
@ -88,8 +87,8 @@ EXAMPLES = r'''
- name: Install several packages - name: Install several packages
community.general.pkgutil: community.general.pkgutil:
name: name:
- CSWsudo - CSWsudo
- CSWtop - CSWtop
state: present state: present
- name: Update all packages - name: Update all packages
@ -102,9 +101,9 @@ EXAMPLES = r'''
name: '*' name: '*'
state: latest state: latest
force: true force: true
''' """
RETURN = r''' # ''' RETURN = r""" # """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -7,21 +7,19 @@
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:
- Masayoshi Mizuma (@mizumm) - Masayoshi Mizuma (@mizumm)
module: pmem module: pmem
short_description: Configure Intel Optane Persistent Memory modules short_description: Configure Intel Optane Persistent Memory modules
version_added: 4.5.0 version_added: 4.5.0
description: description:
- This module allows Configuring Intel Optane Persistent Memory modules - This module allows Configuring Intel Optane Persistent Memory modules (PMem) using C(ipmctl) and C(ndctl) command line tools.
(PMem) using ipmctl and ndctl command line tools.
requirements: requirements:
- ipmctl and ndctl command line tools - C(ipmctl) and C(ndctl) command line tools
- xmltodict - xmltodict
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: none support: none
@ -30,33 +28,31 @@ attributes:
options: options:
appdirect: appdirect:
description: description:
- Percentage of the total capacity to use in AppDirect Mode (V(0)-V(100)). - Percentage of the total capacity to use in AppDirect Mode (V(0)-V(100)).
- Create AppDirect capacity utilizing hardware interleaving across the - Create AppDirect capacity utilizing hardware interleaving across the requested PMem modules if applicable given the specified target.
requested PMem modules if applicable given the specified target. - Total of O(appdirect), O(memorymode) and O(reserved) must be V(100).
- Total of O(appdirect), O(memorymode) and O(reserved) must be V(100)
type: int type: int
appdirect_interleaved: appdirect_interleaved:
description: description:
- Create AppDirect capacity that is interleaved any other PMem modules. - Create AppDirect capacity that is interleaved any other PMem modules.
type: bool type: bool
required: false required: false
default: true default: true
memorymode: memorymode:
description: description:
- Percentage of the total capacity to use in Memory Mode (V(0)-V(100)). - Percentage of the total capacity to use in Memory Mode (V(0)-V(100)).
type: int type: int
reserved: reserved:
description: description:
- Percentage of the capacity to reserve (V(0)-V(100)). O(reserved) will not be mapped - Percentage of the capacity to reserve (V(0)-V(100)). O(reserved) will not be mapped into the system physical address space and will be
into the system physical address space and will be presented as reserved presented as reserved capacity with Show Device and Show Memory Resources Commands.
capacity with Show Device and Show Memory Resources Commands. - O(reserved) will be set automatically if this is not configured.
- O(reserved) will be set automatically if this is not configured.
type: int type: int
required: false required: false
socket: socket:
description: description:
- This enables to set the configuration for each socket by using the socket ID. - This enables to set the configuration for each socket by using the socket ID.
- Total of O(appdirect), O(memorymode) and O(reserved) must be V(100) within one socket. - Total of O(appdirect), O(memorymode) and O(reserved) must be V(100) within one socket.
type: list type: list
elements: dict elements: dict
suboptions: suboptions:
@ -66,18 +62,18 @@ options:
required: true required: true
appdirect: appdirect:
description: description:
- Percentage of the total capacity to use in AppDirect Mode (V(0)-V(100)) within the socket ID. - Percentage of the total capacity to use in AppDirect Mode (V(0)-V(100)) within the socket ID.
type: int type: int
required: true required: true
appdirect_interleaved: appdirect_interleaved:
description: description:
- Create AppDirect capacity that is interleaved any other PMem modules within the socket ID. - Create AppDirect capacity that is interleaved any other PMem modules within the socket ID.
type: bool type: bool
required: false required: false
default: true default: true
memorymode: memorymode:
description: description:
- Percentage of the total capacity to use in Memory Mode (V(0)-V(100)) within the socket ID. - Percentage of the total capacity to use in Memory Mode (V(0)-V(100)) within the socket ID.
type: int type: int
required: true required: true
reserved: reserved:
@ -86,86 +82,86 @@ options:
type: int type: int
namespace: namespace:
description: description:
- This enables to set the configuration for the namespace of the PMem. - This enables to set the configuration for the namespace of the PMem.
type: list type: list
elements: dict elements: dict
suboptions: suboptions:
mode: mode:
description: description:
- The mode of namespace. The detail of the mode is in the man page of ndctl-create-namespace. - The mode of namespace. The detail of the mode is in the man page of ndctl-create-namespace.
type: str type: str
required: true required: true
choices: ['raw', 'sector', 'fsdax', 'devdax'] choices: ['raw', 'sector', 'fsdax', 'devdax']
type: type:
description: description:
- The type of namespace. The detail of the type is in the man page of ndctl-create-namespace. - The type of namespace. The detail of the type is in the man page of ndctl-create-namespace.
type: str type: str
required: false required: false
choices: ['pmem', 'blk'] choices: ['pmem', 'blk']
size: size:
description: description:
- The size of namespace. This option supports the suffixes V(k) or V(K) or V(KB) for KiB, - The size of namespace. This option supports the suffixes V(k) or V(K) or V(KB) for KiB, V(m) or V(M) or V(MB) for MiB, V(g) or V(G)
V(m) or V(M) or V(MB) for MiB, V(g) or V(G) or V(GB) for GiB and V(t) or V(T) or V(TB) for TiB. or V(GB) for GiB and V(t) or V(T) or V(TB) for TiB.
- This option is required if multiple namespaces are configured. - This option is required if multiple namespaces are configured.
- If this option is not set, all of the available space of a region is configured. - If this option is not set, all of the available space of a region is configured.
type: str type: str
required: false required: false
namespace_append: namespace_append:
description: description:
- Enable to append the new namespaces to the system. - Enable to append the new namespaces to the system.
- The default is V(false) so the all existing namespaces not listed in O(namespace) are removed. - The default is V(false) so the all existing namespaces not listed in O(namespace) are removed.
type: bool type: bool
default: false default: false
required: false required: false
''' """
RETURN = r''' RETURN = r"""
reboot_required: reboot_required:
description: Indicates that the system reboot is required to complete the PMem configuration. description: Indicates that the system reboot is required to complete the PMem configuration.
returned: success returned: success
type: bool type: bool
sample: true sample: true
result: result:
description: description:
- Shows the value of AppDirect, Memory Mode and Reserved size in bytes. - Shows the value of AppDirect, Memory Mode and Reserved size in bytes.
- If O(socket) argument is provided, shows the values in each socket with C(socket) which contains the socket ID. - If O(socket) argument is provided, shows the values in each socket with C(socket) which contains the socket ID.
- If O(namespace) argument is provided, shows the detail of each namespace. - If O(namespace) argument is provided, shows the detail of each namespace.
returned: success returned: success
type: list type: list
elements: dict elements: dict
contains: contains:
appdirect: appdirect:
description: AppDirect size in bytes. description: AppDirect size in bytes.
type: int type: int
memorymode: memorymode:
description: Memory Mode size in bytes. description: Memory Mode size in bytes.
type: int type: int
reserved: reserved:
description: Reserved size in bytes. description: Reserved size in bytes.
type: int type: int
socket: socket:
description: The socket ID to be configured. description: The socket ID to be configured.
type: int type: int
namespace: namespace:
description: The list of the detail of namespace. description: The list of the detail of namespace.
type: list type: list
sample: [ sample: [
{ {
"appdirect": 111669149696, "appdirect": 111669149696,
"memorymode": 970662608896, "memorymode": 970662608896,
"reserved": 3626500096, "reserved": 3626500096,
"socket": 0 "socket": 0
}, },
{ {
"appdirect": 111669149696, "appdirect": 111669149696,
"memorymode": 970662608896, "memorymode": 970662608896,
"reserved": 3626500096, "reserved": 3626500096,
"socket": 1 "socket": 1
} }
] ]
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Configure the Pmem as AppDirect 10, Memory Mode 70, and the Reserved 20 percent. - name: Configure the Pmem as AppDirect 10, Memory Mode 70, and the Reserved 20 percent.
community.general.pmem: community.general.pmem:
appdirect: 10 appdirect: 10
@ -205,7 +201,7 @@ EXAMPLES = r'''
- size: 320MB - size: 320MB
type: pmem type: pmem
mode: sector mode: sector
''' """
import json import json
import re import re

View File

@ -12,13 +12,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = """ DOCUMENTATION = r"""
---
module: pnpm module: pnpm
short_description: Manage node.js packages with pnpm short_description: Manage Node.js packages with C(pnpm)
version_added: 7.4.0 version_added: 7.4.0
description: description:
- Manage node.js packages with the L(pnpm package manager, https://pnpm.io/). - Manage Node.js packages with the L(pnpm package manager, https://pnpm.io/).
author: author:
- "Aritra Sen (@aretrosen)" - "Aritra Sen (@aretrosen)"
- "Chris Hoffman (@chrishoffman), creator of NPM Ansible module" - "Chris Hoffman (@chrishoffman), creator of NPM Ansible module"
@ -32,18 +31,18 @@ attributes:
options: options:
name: name:
description: description:
- The name of a node.js library to install. - The name of a Node.js library to install.
- All packages in package.json are installed if not provided. - All packages in C(package.json) are installed if not provided.
type: str type: str
required: false required: false
alias: alias:
description: description:
- Alias of the node.js library. - Alias of the Node.js library.
type: str type: str
required: false required: false
path: path:
description: description:
- The base path to install the node.js libraries. - The base path to install the Node.js libraries.
type: path type: path
required: false required: false
version: version:
@ -53,7 +52,7 @@ options:
required: false required: false
global: global:
description: description:
- Install the node.js library globally. - Install the Node.js library globally.
required: false required: false
default: false default: false
type: bool type: bool
@ -97,7 +96,7 @@ options:
type: bool type: bool
state: state:
description: description:
- Installation state of the named node.js library. - Installation state of the named Node.js library.
- If V(absent) is selected, a name option must be provided. - If V(absent) is selected, a name option must be provided.
type: str type: str
required: false required: false
@ -107,36 +106,36 @@ requirements:
- Pnpm executable present in E(PATH). - Pnpm executable present in E(PATH).
""" """
EXAMPLES = """ EXAMPLES = r"""
- name: Install "tailwindcss" node.js package. - name: Install "tailwindcss" Node.js package.
community.general.pnpm: community.general.pnpm:
name: tailwindcss name: tailwindcss
path: /app/location path: /app/location
- name: Install "tailwindcss" node.js package on version 3.3.2 - name: Install "tailwindcss" Node.js package on version 3.3.2
community.general.pnpm: community.general.pnpm:
name: tailwindcss name: tailwindcss
version: 3.3.2 version: 3.3.2
path: /app/location path: /app/location
- name: Install "tailwindcss" node.js package globally. - name: Install "tailwindcss" Node.js package globally.
community.general.pnpm: community.general.pnpm:
name: tailwindcss name: tailwindcss
global: true global: true
- name: Install "tailwindcss" node.js package as dev dependency. - name: Install "tailwindcss" Node.js package as dev dependency.
community.general.pnpm: community.general.pnpm:
name: tailwindcss name: tailwindcss
path: /app/location path: /app/location
dev: true dev: true
- name: Install "tailwindcss" node.js package as optional dependency. - name: Install "tailwindcss" Node.js package as optional dependency.
community.general.pnpm: community.general.pnpm:
name: tailwindcss name: tailwindcss
path: /app/location path: /app/location
optional: true optional: true
- name: Install "tailwindcss" node.js package version 0.1.3 as tailwind-1 - name: Install "tailwindcss" Node.js package version 0.1.3 as tailwind-1
community.general.pnpm: community.general.pnpm:
name: tailwindcss name: tailwindcss
alias: tailwind-1 alias: tailwind-1
@ -158,6 +157,7 @@ EXAMPLES = """
path: /app/location path: /app/location
state: latest state: latest
""" """
import json import json
import os import os

View File

@ -14,13 +14,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: portage module: portage
short_description: Package manager for Gentoo short_description: Package manager for Gentoo
description: description:
- Manages Gentoo packages - Manages Gentoo packages.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
@ -33,21 +31,21 @@ attributes:
options: options:
package: package:
description: description:
- Package atom or set, for example V(sys-apps/foo) or V(>foo-2.13) or V(@world) - Package atom or set, for example V(sys-apps/foo) or V(>foo-2.13) or V(@world).
aliases: [name] aliases: [name]
type: list type: list
elements: str elements: str
state: state:
description: description:
- State of the package atom - State of the package atom.
default: "present" default: "present"
choices: [ "present", "installed", "emerged", "absent", "removed", "unmerged", "latest" ] choices: ["present", "installed", "emerged", "absent", "removed", "unmerged", "latest"]
type: str type: str
update: update:
description: description:
- Update packages to the best version available (--update) - Update packages to the best version available (C(--update)).
type: bool type: bool
default: false default: false
@ -59,82 +57,81 @@ options:
deep: deep:
description: description:
- Consider the entire dependency tree of packages (--deep) - Consider the entire dependency tree of packages (C(--deep)).
type: bool type: bool
default: false default: false
newuse: newuse:
description: description:
- Include installed packages where USE flags have changed (--newuse) - Include installed packages where USE flags have changed (C(--newuse)).
type: bool type: bool
default: false default: false
changed_use: changed_use:
description: description:
- Include installed packages where USE flags have changed, except when - Include installed packages where USE flags have changed, except when.
- flags that the user has not enabled are added or removed - Flags that the user has not enabled are added or removed.
- (--changed-use) - (C(--changed-use)).
type: bool type: bool
default: false default: false
oneshot: oneshot:
description: description:
- Do not add the packages to the world file (--oneshot) - Do not add the packages to the world file (C(--oneshot)).
type: bool type: bool
default: false default: false
noreplace: noreplace:
description: description:
- Do not re-emerge installed packages (--noreplace) - Do not re-emerge installed packages (C(--noreplace)).
type: bool type: bool
default: true default: true
nodeps: nodeps:
description: description:
- Only merge packages but not their dependencies (--nodeps) - Only merge packages but not their dependencies (C(--nodeps)).
type: bool type: bool
default: false default: false
onlydeps: onlydeps:
description: description:
- Only merge packages' dependencies but not the packages (--onlydeps) - Only merge packages' dependencies but not the packages (C(--onlydeps)).
type: bool type: bool
default: false default: false
depclean: depclean:
description: description:
- Remove packages not needed by explicitly merged packages (--depclean) - Remove packages not needed by explicitly merged packages (C(--depclean)).
- If no package is specified, clean up the world's dependencies - If no package is specified, clean up the world's dependencies.
- Otherwise, --depclean serves as a dependency aware version of --unmerge - Otherwise, C(--depclean) serves as a dependency aware version of C(--unmerge).
type: bool type: bool
default: false default: false
quiet: quiet:
description: description:
- Run emerge in quiet mode (--quiet) - Run emerge in quiet mode (C(--quiet)).
type: bool type: bool
default: false default: false
verbose: verbose:
description: description:
- Run emerge in verbose mode (--verbose) - Run emerge in verbose mode (C(--verbose)).
type: bool type: bool
default: false default: false
select: select:
description: description:
- If set to V(true), explicitely add the package to the world file. - If set to V(true), explicitely add the package to the world file.
- Please note that this option is not used for idempotency, it is only used - Please note that this option is not used for idempotency, it is only used when actually installing a package.
when actually installing a package.
type: bool type: bool
version_added: 8.6.0 version_added: 8.6.0
sync: sync:
description: description:
- Sync package repositories first - Sync package repositories first.
- If V(yes), perform "emerge --sync" - If V(yes), perform C(emerge --sync).
- If V(web), perform "emerge-webrsync" - If V(web), perform C(emerge-webrsync).
choices: [ "web", "yes", "no" ] choices: ["web", "yes", "no"]
type: str type: str
getbinpkgonly: getbinpkgonly:
@ -171,16 +168,13 @@ options:
jobs: jobs:
description: description:
- Specifies the number of packages to build simultaneously. - Specifies the number of packages to build simultaneously.
- "Since version 2.6: Value of 0 or False resets any previously added" - 'Since version 2.6: Value of V(0) or V(false) resets any previously added C(--jobs) setting values.'
- --jobs setting values
type: int type: int
loadavg: loadavg:
description: description:
- Specifies that no new builds should be started if there are - Specifies that no new builds should be started if there are other builds running and the load average is at least LOAD.
- other builds running and the load average is at least LOAD - 'Since version 2.6: Value of 0 or False resets any previously added C(--load-average) setting values.'
- "Since version 2.6: Value of 0 or False resets any previously added"
- --load-average setting values
type: float type: float
withbdeps: withbdeps:
@ -191,26 +185,24 @@ options:
quietbuild: quietbuild:
description: description:
- Redirect all build output to logs alone, and do not display it - Redirect all build output to logs alone, and do not display it on stdout (C(--quiet-build)).
- on stdout (--quiet-build)
type: bool type: bool
default: false default: false
quietfail: quietfail:
description: description:
- Suppresses display of the build log on stdout (--quiet-fail) - Suppresses display of the build log on stdout (--quiet-fail).
- Only the die message and the path of the build log will be - Only the die message and the path of the build log will be displayed on stdout.
- displayed on stdout.
type: bool type: bool
default: false default: false
author: author:
- "William L Thomson Jr (@wltjr)" - "William L Thomson Jr (@wltjr)"
- "Yap Sok Ann (@sayap)" - "Yap Sok Ann (@sayap)"
- "Andrew Udvare (@Tatsh)" - "Andrew Udvare (@Tatsh)"
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Make sure package foo is installed - name: Make sure package foo is installed
community.general.portage: community.general.portage:
package: foo package: foo
@ -252,7 +244,7 @@ EXAMPLES = '''
package: foo package: foo
state: absent state: absent
depclean: true depclean: true
''' """
import os import os
import re import re

View File

@ -12,43 +12,42 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: portinstall module: portinstall
short_description: Installing packages from FreeBSD's ports system short_description: Installing packages from FreeBSD's ports system
description: description:
- Manage packages for FreeBSD using 'portinstall'. - Manage packages for FreeBSD using C(portinstall).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
description: description:
- name of package to install/remove - Name of package to install/remove.
aliases: [pkg] aliases: [pkg]
required: true required: true
type: str type: str
state: state:
description: description:
- state of the package - State of the package.
choices: [ 'present', 'absent' ] choices: ['present', 'absent']
required: false required: false
default: present default: present
type: str type: str
use_packages: use_packages:
description: description:
- use packages instead of ports whenever available - Use packages instead of ports whenever available.
type: bool type: bool
required: false required: false
default: true default: true
author: "berenddeboer (@berenddeboer)" author: "berenddeboer (@berenddeboer)"
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Install package foo - name: Install package foo
community.general.portinstall: community.general.portinstall:
name: foo name: foo
@ -63,7 +62,7 @@ EXAMPLES = '''
community.general.portinstall: community.general.portinstall:
name: foo,bar name: foo,bar
state: absent state: absent
''' """
import re import re

View File

@ -8,54 +8,47 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = """ DOCUMENTATION = r"""
---
module: pritunl_org module: pritunl_org
author: Florian Dambrine (@Lowess) author: Florian Dambrine (@Lowess)
version_added: 2.5.0 version_added: 2.5.0
short_description: Manages Pritunl Organizations using the Pritunl API short_description: Manages Pritunl Organizations using the Pritunl API
description: description:
- A module to manage Pritunl organizations using the Pritunl API. - A module to manage Pritunl organizations using the Pritunl API.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.pritunl - community.general.pritunl
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
type: str type: str
required: true required: true
aliases: aliases:
- org - org
description: description:
- The name of the organization to manage in Pritunl. - The name of the organization to manage in Pritunl.
force:
force: type: bool
type: bool default: false
default: false description:
description: - If O(force) is V(true) and O(state) is V(absent), the module will delete the organization, no matter if it contains users or not. By default
- If O(force) is V(true) and O(state) is V(absent), the module O(force) is V(false), which will cause the module to fail the deletion of the organization when it contains users.
will delete the organization, no matter if it contains users state:
or not. By default O(force) is V(false), which will cause the type: str
module to fail the deletion of the organization when it contains default: 'present'
users. choices:
- present
state: - absent
type: str description:
default: 'present' - If V(present), the module adds organization O(name) to Pritunl. If V(absent), attempt to delete the organization from Pritunl (please
choices: read about O(force) usage).
- present
- absent
description:
- If V(present), the module adds organization O(name) to
Pritunl. If V(absent), attempt to delete the organization
from Pritunl (please read about O(force) usage).
""" """
EXAMPLES = """ EXAMPLES = r"""
- name: Ensure the organization named MyOrg exists - name: Ensure the organization named MyOrg exists
community.general.pritunl_org: community.general.pritunl_org:
state: present state: present
@ -67,7 +60,7 @@ EXAMPLES = """
name: MyOrg name: MyOrg
""" """
RETURN = """ RETURN = r"""
response: response:
description: JSON representation of a Pritunl Organization. description: JSON representation of a Pritunl Organization.
returned: success returned: success

View File

@ -8,32 +8,29 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = """ DOCUMENTATION = r"""
---
module: pritunl_org_info module: pritunl_org_info
author: Florian Dambrine (@Lowess) author: Florian Dambrine (@Lowess)
version_added: 2.5.0 version_added: 2.5.0
short_description: List Pritunl Organizations using the Pritunl API short_description: List Pritunl Organizations using the Pritunl API
description: description:
- A module to list Pritunl organizations using the Pritunl API. - A module to list Pritunl organizations using the Pritunl API.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.pritunl - community.general.pritunl
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
options: options:
organization: organization:
type: str type: str
required: false required: false
aliases: aliases:
- org - org
default: null default: null
description: description:
- Name of the Pritunl organization to search for. - Name of the Pritunl organization to search for. If none provided, the module will return all Pritunl organizations.
If none provided, the module will return all Pritunl
organizations.
""" """
EXAMPLES = """ EXAMPLES = r"""
- name: List all existing Pritunl organizations - name: List all existing Pritunl organizations
community.general.pritunl_org_info: community.general.pritunl_org_info:
@ -42,7 +39,7 @@ EXAMPLES = """
organization: MyOrg organization: MyOrg
""" """
RETURN = """ RETURN = r"""
organizations: organizations:
description: List of Pritunl organizations. description: List of Pritunl organizations.
returned: success returned: success

View File

@ -8,97 +8,87 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = """ DOCUMENTATION = r"""
---
module: pritunl_user module: pritunl_user
author: "Florian Dambrine (@Lowess)" author: "Florian Dambrine (@Lowess)"
version_added: 2.3.0 version_added: 2.3.0
short_description: Manage Pritunl Users using the Pritunl API short_description: Manage Pritunl Users using the Pritunl API
description: description:
- A module to manage Pritunl users using the Pritunl API. - A module to manage Pritunl users using the Pritunl API.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.pritunl - community.general.pritunl
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
organization: organization:
type: str type: str
required: true required: true
aliases: aliases:
- org - org
description: description:
- The name of the organization the user is part of. - The name of the organization the user is part of.
state:
state: type: str
type: str default: 'present'
default: 'present' choices:
choices: - present
- present - absent
- absent description:
description: - If V(present), the module adds user O(user_name) to the Pritunl O(organization). If V(absent), removes the user O(user_name) from the
- If V(present), the module adds user O(user_name) to Pritunl O(organization).
the Pritunl O(organization). If V(absent), removes the user user_name:
O(user_name) from the Pritunl O(organization). type: str
required: true
user_name: default:
type: str description:
required: true - Name of the user to create or delete from Pritunl.
default: null user_email:
description: type: str
- Name of the user to create or delete from Pritunl. required: false
default:
user_email: description:
type: str - Email address associated with the user O(user_name).
required: false user_type:
default: null type: str
description: required: false
- Email address associated with the user O(user_name). default: client
choices:
user_type: - client
type: str - server
required: false description:
default: client - Type of the user O(user_name).
choices: user_groups:
- client type: list
- server elements: str
description: required: false
- Type of the user O(user_name). default:
description:
user_groups: - List of groups associated with the user O(user_name).
type: list user_disabled:
elements: str type: bool
required: false required: false
default: null default:
description: description:
- List of groups associated with the user O(user_name). - Enable/Disable the user O(user_name).
user_gravatar:
user_disabled: type: bool
type: bool required: false
required: false default:
default: null description:
description: - Enable/Disable Gravatar usage for the user O(user_name).
- Enable/Disable the user O(user_name). user_mac_addresses:
type: list
user_gravatar: elements: str
type: bool description:
required: false - Allowed MAC addresses for the user O(user_name).
default: null version_added: 5.0.0
description:
- Enable/Disable Gravatar usage for the user O(user_name).
user_mac_addresses:
type: list
elements: str
description:
- Allowed MAC addresses for the user O(user_name).
version_added: 5.0.0
""" """
EXAMPLES = """ EXAMPLES = r"""
- name: Create the user Foo with email address foo@bar.com in MyOrg - name: Create the user Foo with email address foo@bar.com in MyOrg
community.general.pritunl_user: community.general.pritunl_user:
state: present state: present
@ -123,7 +113,7 @@ EXAMPLES = """
user_name: Foo user_name: Foo
""" """
RETURN = """ RETURN = r"""
response: response:
description: JSON representation of Pritunl Users. description: JSON representation of Pritunl Users.
returned: success returned: success

View File

@ -8,45 +8,42 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = """ DOCUMENTATION = r"""
---
module: pritunl_user_info module: pritunl_user_info
author: "Florian Dambrine (@Lowess)" author: "Florian Dambrine (@Lowess)"
version_added: 2.3.0 version_added: 2.3.0
short_description: List Pritunl Users using the Pritunl API short_description: List Pritunl Users using the Pritunl API
description: description:
- A module to list Pritunl users using the Pritunl API. - A module to list Pritunl users using the Pritunl API.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.pritunl - community.general.pritunl
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
options: options:
organization: organization:
type: str type: str
required: true required: true
aliases: aliases:
- org - org
description: description:
- The name of the organization the user is part of. - The name of the organization the user is part of.
user_name:
user_name: type: str
type: str required: false
required: false description:
description: - Name of the user to filter on Pritunl.
- Name of the user to filter on Pritunl. user_type:
type: str
user_type: required: false
type: str default: client
required: false choices:
default: client - client
choices: - server
- client description:
- server - Type of the user O(user_name).
description:
- Type of the user O(user_name).
""" """
EXAMPLES = """ EXAMPLES = r"""
- name: List all existing users part of the organization MyOrg - name: List all existing users part of the organization MyOrg
community.general.pritunl_user_info: community.general.pritunl_user_info:
state: list state: list
@ -59,7 +56,7 @@ EXAMPLES = """
user_name: Florian user_name: Florian
""" """
RETURN = """ RETURN = r"""
users: users:
description: List of Pritunl users. description: List of Pritunl users.
returned: success returned: success

View File

@ -8,13 +8,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: profitbricks module: profitbricks
short_description: Create, destroy, start, stop, and reboot a ProfitBricks virtual machine short_description: Create, destroy, start, stop, and reboot a ProfitBricks virtual machine
description: description:
- Create, destroy, update, start, stop, and reboot a ProfitBricks virtual machine. When the virtual machine is created it can optionally wait - Create, destroy, update, start, stop, and reboot a ProfitBricks virtual machine. When the virtual machine is created it can optionally wait
for it to be 'running' before returning. This module has a dependency on profitbricks >= 1.0.0 for it to be 'running' before returning. This module has a dependency on profitbricks >= 1.0.0.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -34,7 +33,7 @@ options:
type: str type: str
image: image:
description: description:
- The system image ID for creating the virtual machine, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. - The system image ID for creating the virtual machine, for example V(a3eae284-a2fe-11e4-b187-5f1f641608c8).
type: str type: str
image_password: image_password:
description: description:
@ -65,7 +64,7 @@ options:
- The CPU family type to allocate to the virtual machine. - The CPU family type to allocate to the virtual machine.
type: str type: str
default: AMD_OPTERON default: AMD_OPTERON
choices: [ "AMD_OPTERON", "INTEL_XEON" ] choices: ["AMD_OPTERON", "INTEL_XEON"]
volume_size: volume_size:
description: description:
- The size in GB of the boot volume. - The size in GB of the boot volume.
@ -76,10 +75,10 @@ options:
- The bus type for the volume. - The bus type for the volume.
type: str type: str
default: VIRTIO default: VIRTIO
choices: [ "IDE", "VIRTIO"] choices: ["IDE", "VIRTIO"]
instance_ids: instance_ids:
description: description:
- list of instance ids, currently only used when state='absent' to remove instances. - List of instance ids, currently only used when state='absent' to remove instances.
type: list type: list
elements: str elements: str
default: [] default: []
@ -93,7 +92,7 @@ options:
- The datacenter location. Use only if you want to create the Datacenter or else this value is ignored. - The datacenter location. Use only if you want to create the Datacenter or else this value is ignored.
type: str type: str
default: us/las default: us/las
choices: [ "us/las", "de/fra", "de/fkb" ] choices: ["us/las", "de/fra", "de/fkb"]
assign_public_ip: assign_public_ip:
description: description:
- This will assign the machine to the public LAN. If no LAN exists with public Internet access it is created. - This will assign the machine to the public LAN. If no LAN exists with public Internet access it is created.
@ -106,47 +105,46 @@ options:
default: 1 default: 1
subscription_user: subscription_user:
description: description:
- The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. - The ProfitBricks username. Overrides the E(PB_SUBSCRIPTION_ID) environment variable.
type: str type: str
subscription_password: subscription_password:
description: description:
- THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. - THe ProfitBricks password. Overrides the E(PB_PASSWORD) environment variable.
type: str type: str
wait: wait:
description: description:
- wait for the instance to be in state 'running' before returning - Wait for the instance to be in state 'running' before returning.
type: bool type: bool
default: true default: true
wait_timeout: wait_timeout:
description: description:
- how long before wait gives up, in seconds - How long before wait gives up, in seconds.
type: int type: int
default: 600 default: 600
remove_boot_volume: remove_boot_volume:
description: description:
- remove the bootVolume of the virtual machine you're destroying. - Remove the bootVolume of the virtual machine you are destroying.
type: bool type: bool
default: true default: true
state: state:
description: description:
- create or terminate instances - Create or terminate instances.
- 'The choices available are: V(running), V(stopped), V(absent), V(present).' - 'The choices available are: V(running), V(stopped), V(absent), V(present).'
type: str type: str
default: 'present' default: 'present'
disk_type: disk_type:
description: description:
- the type of disk to be allocated. - The type of disk to be allocated.
type: str type: str
choices: [SSD, HDD] choices: [SSD, HDD]
default: HDD default: HDD
requirements: requirements:
- "profitbricks" - "profitbricks"
author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com> author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
''' """
EXAMPLES = '''
EXAMPLES = r"""
# Note: These examples do not set authentication details, see the AWS Guide for details. # Note: These examples do not set authentication details, see the AWS Guide for details.
# Provisioning example # Provisioning example
@ -192,7 +190,7 @@ EXAMPLES = '''
- 'web003.stackpointcloud.com' - 'web003.stackpointcloud.com'
wait_timeout: 500 wait_timeout: 500
state: stopped state: stopped
''' """
import re import re
import uuid import uuid

View File

@ -8,13 +8,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: profitbricks_datacenter module: profitbricks_datacenter
short_description: Create or destroy a ProfitBricks Virtual Datacenter short_description: Create or destroy a ProfitBricks Virtual Datacenter
description: description:
- This is a simple module that supports creating or removing vDCs. A vDC is required before you can create servers. This module has a dependency - This is a simple module that supports creating or removing vDCs. A vDC is required before you can create servers. This module has a dependency
on profitbricks >= 1.0.0 on profitbricks >= 1.0.0.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -38,41 +37,41 @@ options:
type: str type: str
required: false required: false
default: us/las default: us/las
choices: [ "us/las", "de/fra", "de/fkb" ] choices: ["us/las", "de/fra", "de/fkb"]
subscription_user: subscription_user:
description: description:
- The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. - The ProfitBricks username. Overrides the E(PB_SUBSCRIPTION_ID) environment variable.
type: str type: str
required: false required: false
subscription_password: subscription_password:
description: description:
- THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. - THe ProfitBricks password. Overrides the E(PB_PASSWORD) environment variable.
type: str type: str
required: false required: false
wait: wait:
description: description:
- wait for the datacenter to be created before returning - Wait for the datacenter to be created before returning.
required: false required: false
default: true default: true
type: bool type: bool
wait_timeout: wait_timeout:
description: description:
- how long before wait gives up, in seconds - How long before wait gives up, in seconds.
type: int type: int
default: 600 default: 600
state: state:
description: description:
- Create or terminate datacenters. - Create or terminate datacenters.
- "The available choices are: V(present), V(absent)." - 'The available choices are: V(present), V(absent).'
type: str type: str
required: false required: false
default: 'present' default: 'present'
requirements: [ "profitbricks" ] requirements: ["profitbricks"]
author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com> author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a datacenter - name: Create a datacenter
community.general.profitbricks_datacenter: community.general.profitbricks_datacenter:
datacenter: Tardis One datacenter: Tardis One
@ -83,7 +82,7 @@ EXAMPLES = '''
datacenter: Tardis One datacenter: Tardis One
wait_timeout: 500 wait_timeout: 500
state: absent state: absent
''' """
import re import re
import time import time

View File

@ -8,12 +8,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: profitbricks_nic module: profitbricks_nic
short_description: Create or Remove a NIC short_description: Create or Remove a NIC
description: description:
- This module allows you to create or restore a volume snapshot. This module has a dependency on profitbricks >= 1.0.0 - This module allows you to create or restore a volume snapshot. This module has a dependency on profitbricks >= 1.0.0.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -39,42 +38,42 @@ options:
type: str type: str
lan: lan:
description: description:
- The LAN to place the NIC on. You can pass a LAN that doesn't exist and it will be created. Required on create. - The LAN to place the NIC on. You can pass a LAN that does not exist and it will be created. Required on create.
type: str type: str
subscription_user: subscription_user:
description: description:
- The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. - The ProfitBricks username. Overrides the E(PB_SUBSCRIPTION_ID) environment variable.
type: str type: str
required: true required: true
subscription_password: subscription_password:
description: description:
- THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. - THe ProfitBricks password. Overrides the E(PB_PASSWORD) environment variable.
type: str type: str
required: true required: true
wait: wait:
description: description:
- wait for the operation to complete before returning - Wait for the operation to complete before returning.
required: false required: false
default: true default: true
type: bool type: bool
wait_timeout: wait_timeout:
description: description:
- how long before wait gives up, in seconds - How long before wait gives up, in seconds.
type: int type: int
default: 600 default: 600
state: state:
description: description:
- Indicate desired state of the resource - Indicate desired state of the resource.
- "The available choices are: V(present), V(absent)." - 'The available choices are: V(present), V(absent).'
type: str type: str
required: false required: false
default: 'present' default: 'present'
requirements: [ "profitbricks" ] requirements: ["profitbricks"]
author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com> author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a NIC - name: Create a NIC
community.general.profitbricks_nic: community.general.profitbricks_nic:
datacenter: Tardis One datacenter: Tardis One
@ -90,7 +89,7 @@ EXAMPLES = '''
name: 7341c2454f name: 7341c2454f
wait_timeout: 500 wait_timeout: 500
state: absent state: absent
''' """
import re import re
import uuid import uuid

View File

@ -8,12 +8,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: profitbricks_volume module: profitbricks_volume
short_description: Create or destroy a volume short_description: Create or destroy a volume
description: description:
- Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0 - Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -42,10 +41,10 @@ options:
type: str type: str
required: false required: false
default: VIRTIO default: VIRTIO
choices: [ "IDE", "VIRTIO"] choices: ["IDE", "VIRTIO"]
image: image:
description: description:
- The system image ID for the volume, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. This can also be a snapshot image ID. - The system image ID for the volume, for example V(a3eae284-a2fe-11e4-b187-5f1f641608c8). This can also be a snapshot image ID.
type: str type: str
image_password: image_password:
description: description:
@ -64,11 +63,11 @@ options:
type: str type: str
required: false required: false
default: HDD default: HDD
choices: [ "HDD", "SSD" ] choices: ["HDD", "SSD"]
licence_type: licence_type:
description: description:
- The licence type for the volume. This is used when the image is non-standard. - The licence type for the volume. This is used when the image is non-standard.
- "The available choices are: V(LINUX), V(WINDOWS), V(UNKNOWN), V(OTHER)." - 'The available choices are: V(LINUX), V(WINDOWS), V(UNKNOWN), V(OTHER).'
type: str type: str
required: false required: false
default: UNKNOWN default: UNKNOWN
@ -85,35 +84,35 @@ options:
type: bool type: bool
instance_ids: instance_ids:
description: description:
- list of instance ids, currently only used when state='absent' to remove instances. - List of instance ids, currently only used when state='absent' to remove instances.
type: list type: list
elements: str elements: str
default: [] default: []
subscription_user: subscription_user:
description: description:
- The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. - The ProfitBricks username. Overrides the E(PB_SUBSCRIPTION_ID) environment variable.
type: str type: str
required: false required: false
subscription_password: subscription_password:
description: description:
- THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. - THe ProfitBricks password. Overrides the E(PB_PASSWORD) environment variable.
type: str type: str
required: false required: false
wait: wait:
description: description:
- wait for the datacenter to be created before returning - Wait for the datacenter to be created before returning.
required: false required: false
default: true default: true
type: bool type: bool
wait_timeout: wait_timeout:
description: description:
- how long before wait gives up, in seconds - How long before wait gives up, in seconds.
type: int type: int
default: 600 default: 600
state: state:
description: description:
- create or terminate datacenters - Create or terminate datacenters.
- "The available choices are: V(present), V(absent)." - 'The available choices are: V(present), V(absent).'
type: str type: str
required: false required: false
default: 'present' default: 'present'
@ -122,11 +121,11 @@ options:
- Server name to attach the volume to. - Server name to attach the volume to.
type: str type: str
requirements: [ "profitbricks" ] requirements: ["profitbricks"]
author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com> author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create multiple volumes - name: Create multiple volumes
community.general.profitbricks_volume: community.general.profitbricks_volume:
datacenter: Tardis One datacenter: Tardis One
@ -144,7 +143,7 @@ EXAMPLES = '''
- 'vol02' - 'vol02'
wait_timeout: 500 wait_timeout: 500
state: absent state: absent
''' """
import re import re
import time import time

View File

@ -8,12 +8,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: profitbricks_volume_attachments module: profitbricks_volume_attachments
short_description: Attach or detach a volume short_description: Attach or detach a volume
description: description:
- Allows you to attach or detach a volume from a ProfitBricks server. This module has a dependency on profitbricks >= 1.0.0 - Allows you to attach or detach a volume from a ProfitBricks server. This module has a dependency on profitbricks >= 1.0.0.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -36,38 +35,38 @@ options:
type: str type: str
subscription_user: subscription_user:
description: description:
- The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. - The ProfitBricks username. Overrides the E(PB_SUBSCRIPTION_ID) environment variable.
type: str type: str
required: false required: false
subscription_password: subscription_password:
description: description:
- THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. - THe ProfitBricks password. Overrides the E(PB_PASSWORD) environment variable.
type: str type: str
required: false required: false
wait: wait:
description: description:
- wait for the operation to complete before returning - Wait for the operation to complete before returning.
required: false required: false
default: true default: true
type: bool type: bool
wait_timeout: wait_timeout:
description: description:
- how long before wait gives up, in seconds - How long before wait gives up, in seconds.
type: int type: int
default: 600 default: 600
state: state:
description: description:
- Indicate desired state of the resource - Indicate desired state of the resource.
- "The available choices are: V(present), V(absent)." - 'The available choices are: V(present), V(absent).'
type: str type: str
required: false required: false
default: 'present' default: 'present'
requirements: [ "profitbricks" ] requirements: ["profitbricks"]
author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com> author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Attach a volume - name: Attach a volume
community.general.profitbricks_volume_attachments: community.general.profitbricks_volume_attachments:
datacenter: Tardis One datacenter: Tardis One
@ -83,7 +82,7 @@ EXAMPLES = '''
volume: vol01 volume: vol01
wait_timeout: 500 wait_timeout: 500
state: absent state: absent
''' """
import re import re
import time import time