Skip to content

Commit

Permalink
Add proxmox action group (#8334)
Browse files Browse the repository at this point in the history
Add proxmox module defaults group.
  • Loading branch information
felixfontein authored May 12, 2024
1 parent 7f4f066 commit 7dd7cbd
Show file tree
Hide file tree
Showing 19 changed files with 97 additions and 12 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/8334-proxmox-action-group.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- "proxmox* modules - there is now a ``community.general.proxmox`` module defaults group that can be used to set default options for all Proxmox modules (https://github.com/ansible-collections/community.general/pull/8334)."
17 changes: 17 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@ action_groups:
- consul_role
- consul_session
- consul_token
proxmox:
- proxmox
- proxmox_disk
- proxmox_domain_info
- proxmox_group_info
- proxmox_kvm
- proxmox_nic
- proxmox_node_info
- proxmox_pool
- proxmox_pool_member
- proxmox_snap
- proxmox_storage_contents_info
- proxmox_storage_info
- proxmox_tasks_info
- proxmox_template
- proxmox_user_info
- proxmox_vm_info
plugin_routing:
callback:
actionable:
Expand Down
10 changes: 10 additions & 0 deletions plugins/doc_fragments/proxmox.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,13 @@ class ModuleDocFragment(object):
- Add the new VM to the specified pool.
type: str
'''

ACTIONGROUP_PROXMOX = r"""
options: {}
attributes:
action_group:
description: Use C(group/community.general.proxmox) in C(module_defaults) to set defaults for this module.
support: full
membership:
- community.general.proxmox
"""
3 changes: 3 additions & 0 deletions plugins/modules/proxmox.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
support: none
diff_mode:
support: none
action_group:
version_added: 9.0.0
options:
password:
description:
Expand Down Expand Up @@ -216,6 +218,7 @@
seealso:
- module: community.general.proxmox_vm_info
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.proxmox.selection
- community.general.attributes
Expand Down
3 changes: 3 additions & 0 deletions plugins/modules/proxmox_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
support: none
diff_mode:
support: none
action_group:
version_added: 9.0.0
options:
name:
description:
Expand Down Expand Up @@ -325,6 +327,7 @@
- The drive's worldwide name, encoded as 16 bytes hex string, prefixed by V(0x).
type: str
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
'''
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/proxmox_domain_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
version_added: 1.3.0
description:
- Retrieve information about one or more Proxmox VE domains.
attributes:
action_group:
version_added: 9.0.0
options:
domain:
description:
Expand All @@ -24,6 +27,7 @@
type: str
author: Tristan Le Guern (@tleguern)
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/proxmox_group_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
version_added: 1.3.0
description:
- Retrieve information about one or more Proxmox VE groups
attributes:
action_group:
version_added: 9.0.0
options:
group:
description:
Expand All @@ -24,6 +27,7 @@
type: str
author: Tristan Le Guern (@tleguern)
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
Expand Down
3 changes: 3 additions & 0 deletions plugins/modules/proxmox_kvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
support: none
diff_mode:
support: none
action_group:
version_added: 9.0.0
options:
archive:
description:
Expand Down Expand Up @@ -579,6 +581,7 @@
seealso:
- module: community.general.proxmox_vm_info
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.proxmox.selection
- community.general.attributes
Expand Down
3 changes: 3 additions & 0 deletions plugins/modules/proxmox_nic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
support: full
diff_mode:
support: none
action_group:
version_added: 9.0.0
options:
bridge:
description:
Expand Down Expand Up @@ -94,6 +96,7 @@
- Specifies the instance ID.
type: int
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
'''
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/proxmox_node_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
description:
- Retrieve information about one or more Proxmox VE nodes.
author: John Berninger (@jwbernin)
attributes:
action_group:
version_added: 9.0.0
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
Expand Down
7 changes: 5 additions & 2 deletions plugins/modules/proxmox_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
support: full
diff_mode:
support: none
action_group:
version_added: 9.0.0
options:
poolid:
description:
Expand All @@ -42,8 +44,9 @@
type: str
extends_documentation_fragment:
- community.general.proxmox.documentation
- community.general.attributes
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
"""

EXAMPLES = """
Expand Down
7 changes: 5 additions & 2 deletions plugins/modules/proxmox_pool_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
support: full
diff_mode:
support: full
action_group:
version_added: 9.0.0
options:
poolid:
description:
Expand Down Expand Up @@ -48,8 +50,9 @@
type: str
extends_documentation_fragment:
- community.general.proxmox.documentation
- community.general.attributes
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
"""

EXAMPLES = """
Expand Down
7 changes: 5 additions & 2 deletions plugins/modules/proxmox_snap.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
support: full
diff_mode:
support: none
action_group:
version_added: 9.0.0
options:
hostname:
description:
Expand Down Expand Up @@ -89,8 +91,9 @@
requirements: [ "proxmoxer", "requests" ]
author: Jeffrey van Pelt (@Thulium-Drake)
extends_documentation_fragment:
- community.general.proxmox.documentation
- community.general.attributes
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
'''

EXAMPLES = r'''
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/proxmox_storage_contents_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
version_added: 8.2.0
description:
- Retrieves information about stored objects on a specific storage attached to a node.
attributes:
action_group:
version_added: 9.0.0
options:
storage:
description:
Expand All @@ -41,6 +44,7 @@
type: int
author: Julian Vanden Broeck (@l00ptr)
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/proxmox_storage_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
version_added: 2.2.0
description:
- Retrieve information about one or more Proxmox VE storages.
attributes:
action_group:
version_added: 9.0.0
options:
storage:
description:
Expand All @@ -28,6 +31,7 @@
type: str
author: Tristan Le Guern (@tleguern)
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
Expand Down
10 changes: 7 additions & 3 deletions plugins/modules/proxmox_tasks_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
description:
- Retrieve information about one or more Proxmox VE tasks.
author: 'Andreas Botzner (@paginabianca) <andreas at botzner dot com>'
attributes:
action_group:
version_added: 9.0.0
options:
node:
description:
Expand All @@ -29,9 +32,10 @@
aliases: ['upid', 'name']
type: str
extends_documentation_fragment:
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
'''


Expand Down
3 changes: 3 additions & 0 deletions plugins/modules/proxmox_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
support: none
diff_mode:
support: none
action_group:
version_added: 9.0.0
options:
node:
description:
Expand Down Expand Up @@ -69,6 +71,7 @@
- C(proxmoxer) >= 1.2.0 requires C(requests_toolbelt) to upload files larger than 256 MB.
author: Sergei Antipov (@UnderGreen)
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
'''
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/proxmox_user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
version_added: 1.3.0
description:
- Retrieve information about one or more Proxmox VE users
attributes:
action_group:
version_added: 9.0.0
options:
domain:
description:
Expand All @@ -33,6 +36,7 @@
type: str
author: Tristan Le Guern (@tleguern)
extends_documentation_fragment:
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
Expand Down
10 changes: 7 additions & 3 deletions plugins/modules/proxmox_vm_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
description:
- Retrieve information about one or more Proxmox VE virtual machines.
author: 'Sergei Antipov (@UnderGreen) <greendayonfire at gmail dot com>'
attributes:
action_group:
version_added: 9.0.0
options:
node:
description:
Expand Down Expand Up @@ -55,9 +58,10 @@
default: none
version_added: 8.1.0
extends_documentation_fragment:
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
- community.general.proxmox.actiongroup_proxmox
- community.general.proxmox.documentation
- community.general.attributes
- community.general.attributes.info_module
"""

EXAMPLES = """
Expand Down

0 comments on commit 7dd7cbd

Please sign in to comment.