diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:27 +0000 |
commit | 3b0807ad7b283c46c21862eb826dcbb4ad04e5e2 (patch) | |
tree | 6461ea75f03eca87a5a90c86c3c9a787a6ad037e /ansible_collections/cisco/ucs | |
parent | Adding debian version 7.7.0+dfsg-3. (diff) | |
download | ansible-3b0807ad7b283c46c21862eb826dcbb4ad04e5e2.tar.xz ansible-3b0807ad7b283c46c21862eb826dcbb4ad04e5e2.zip |
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/cisco/ucs')
10 files changed, 69 insertions, 65 deletions
diff --git a/ansible_collections/cisco/ucs/FILES.json b/ansible_collections/cisco/ucs/FILES.json index 639a02b6f..b46cfe00f 100644 --- a/ansible_collections/cisco/ucs/FILES.json +++ b/ansible_collections/cisco/ucs/FILES.json @@ -74,7 +74,7 @@ "name": "plugins/module_utils/ucs.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1c2bb177e2a14aada0ef9921533ed78813e7969b77b5e5aa25f383e21e94f5e1", + "chksum_sha256": "7ac49f880db68eec0a6affe37f75dd03704f96a0ebaf66b0193df5623c90af06", "format": 1 }, { @@ -130,7 +130,7 @@ "name": "plugins/modules/ucs_wwn_pool.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "64fd4588ad5f970d9ebb7326d0cbde40c38a7dc243252e0fd55a8118e162f670", + "chksum_sha256": "bfe00c031bdc2db0ea0911766743c4ad0c33c0ad0b059a0a1f85a91eb4f9b8a4", "format": 1 }, { @@ -158,7 +158,7 @@ "name": "plugins/modules/ucs_disk_group_policy.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b2079621e3ec6b509006acd22ac9a422191926cfd34315ca8c0af843cdb96870", + "chksum_sha256": "05cd0f87e3b2fe4fefbacfa14f8cae61f393e4b2e5b87fea84bbf732917fbf41", "format": 1 }, { @@ -186,7 +186,7 @@ "name": "plugins/modules/ucs_dns_server.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "737d20161c466848d0d4fef11cf989a70c37a8b1255c76ed77f74cdc56748458", + "chksum_sha256": "fbf0ad798a8854056bc897457ad21f50b41efc01f2428acabbe626e354a51c9e", "format": 1 }, { @@ -270,7 +270,7 @@ "name": "plugins/modules/ucs_server_maintenance.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7909713ae7541e07c14a47fdeef30741b35424a49be8688a582aee60d80e2c07", + "chksum_sha256": "24b89166ac8bc34b3d9715a44baa1415185f177bd5d230462f823e844e7f9563", "format": 1 }, { @@ -494,7 +494,7 @@ "name": "playbooks/roles/servers/defaults/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bbe7b86819348adaf8076cc9633535a80b858b957860d97cddc71acf0018e7c3", + "chksum_sha256": "f59e652166af3b702f5f025ac0a3495b09ee2eba152e35ef3b8ca9a68ecc167c", "format": 1 }, { @@ -613,14 +613,14 @@ "name": "playbooks/ucs_dns_server.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1d6622fbe1de63bc74e280c556ea2c1047b8dcb76f3fc2c3e808647f142c4c2d", + "chksum_sha256": "e19c9ddc5764373ac075751ac24d93b591aef74d9aaa6e88992b695f571140e0", "format": 1 }, { "name": "playbooks/ucs_disk_group_policy.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ae1f622dfcb5d1c1a31244432ea35b1b1fbba0da585ad19d2ba7321a52168c75", + "chksum_sha256": "68f457405b58dcec795dd528fe60129aced435ca390fa9d9c7c12798bb59b76a", "format": 1 }, { diff --git a/ansible_collections/cisco/ucs/MANIFEST.json b/ansible_collections/cisco/ucs/MANIFEST.json index 83036def8..b30cb31c5 100644 --- a/ansible_collections/cisco/ucs/MANIFEST.json +++ b/ansible_collections/cisco/ucs/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "cisco", "name": "ucs", - "version": "1.8.0", + "version": "1.10.0", "authors": [ "David Soper (@dsoper2)", "John McDonough (@movinalot)" @@ -27,7 +27,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "aa96b36e3d9e7dde362cd2a55ef8ed616efc0a72203cd68c86281fc5042732ae", + "chksum_sha256": "7e92359c70babcf9e0452f6a16a7a9262077be61b343cb4e79f2899962b42661", "format": 1 }, "format": 1 diff --git a/ansible_collections/cisco/ucs/playbooks/roles/servers/defaults/tasks/main.yml b/ansible_collections/cisco/ucs/playbooks/roles/servers/defaults/tasks/main.yml index ab28cd57a..c6ab3b64d 100644 --- a/ansible_collections/cisco/ucs/playbooks/roles/servers/defaults/tasks/main.yml +++ b/ansible_collections/cisco/ucs/playbooks/roles/servers/defaults/tasks/main.yml @@ -96,41 +96,11 @@ - module: ucsmsdk.mometa.compute.ComputePooledSlot class: ComputePooledSlot properties: - chassis_id: '1' + chassis_id: '4' slot_id: '1' - module: ucsmsdk.mometa.compute.ComputePooledSlot class: ComputePooledSlot properties: - chassis_id: '1' + chassis_id: '4' slot_id: '2' - - module: ucsmsdk.mometa.compute.ComputePooledSlot - class: ComputePooledSlot - properties: - chassis_id: '1' - slot_id: '3' - - module: ucsmsdk.mometa.compute.ComputePooledSlot - class: ComputePooledSlot - properties: - chassis_id: '1' - slot_id: '4' - - module: ucsmsdk.mometa.compute.ComputePooledSlot - class: ComputePooledSlot - properties: - chassis_id: '1' - slot_id: '5' - - module: ucsmsdk.mometa.compute.ComputePooledSlot - class: ComputePooledSlot - properties: - chassis_id: '1' - slot_id: '6' - - module: ucsmsdk.mometa.compute.ComputePooledSlot - class: ComputePooledSlot - properties: - chassis_id: '1' - slot_id: '7' - - module: ucsmsdk.mometa.compute.ComputePooledSlot - class: ComputePooledSlot - properties: - chassis_id: '1' - slot_id: '8' tags: server_pool diff --git a/ansible_collections/cisco/ucs/playbooks/ucs_disk_group_policy.yml b/ansible_collections/cisco/ucs/playbooks/ucs_disk_group_policy.yml index 877bdb93c..6eaf3237c 100644 --- a/ansible_collections/cisco/ucs/playbooks/ucs_disk_group_policy.yml +++ b/ansible_collections/cisco/ucs/playbooks/ucs_disk_group_policy.yml @@ -24,7 +24,7 @@ parent_org_path: root description: level1 org state: present - delegate_to: localhost + delegate_to: localhost - name: Configure Disk Group Policy cisco.ucs.ucs_disk_group_policy: @@ -38,6 +38,7 @@ - slot_num: '2' role: normal org_dn: org-root/org-level1 + delegate_to: localhost - name: Remove Disk from Policy cisco.ucs.ucs_disk_group_policy: @@ -57,6 +58,7 @@ io_policy: direct strip_size: 64KB org_dn: org-root/org-level1 + delegate_to: localhost - name: Remove Disk Group Policy cisco.ucs.ucs_disk_group_policy: @@ -64,6 +66,7 @@ name: DEE-DG state: absent org_dn: org-root/org-level1 + delegate_to: localhost - name: Remove UCS Organization cisco.ucs.ucs_org: @@ -71,4 +74,4 @@ org_name: level1 parent_org_path: root state: absent - delegate_to: localhost
\ No newline at end of file + delegate_to: localhost
\ No newline at end of file diff --git a/ansible_collections/cisco/ucs/playbooks/ucs_dns_server.yml b/ansible_collections/cisco/ucs/playbooks/ucs_dns_server.yml index 5ded54b24..b00878b39 100644 --- a/ansible_collections/cisco/ucs/playbooks/ucs_dns_server.yml +++ b/ansible_collections/cisco/ucs/playbooks/ucs_dns_server.yml @@ -23,11 +23,11 @@ dns_server: 10.10.10.10 description: DNS Server IP address state: present - delegate_to: localhost + delegate_to: localhost - name: Remove DNS server cisco.ucs.ucs_dns_server: <<: *login_info dns_server: 10.10.10.10 state: absent - delegate_to: localhost
\ No newline at end of file + delegate_to: localhost
\ No newline at end of file diff --git a/ansible_collections/cisco/ucs/plugins/module_utils/ucs.py b/ansible_collections/cisco/ucs/plugins/module_utils/ucs.py index bbb0a407a..c8cab9659 100644 --- a/ansible_collections/cisco/ucs/plugins/module_utils/ucs.py +++ b/ansible_collections/cisco/ucs/plugins/module_utils/ucs.py @@ -27,12 +27,16 @@ # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import traceback from ansible.module_utils.basic import missing_required_lib UCSMSDK_IMP_ERR = None try: + # import done here to provide common import check for all modules + # pylint: disable=unused-import import ucsmsdk HAS_UCSMSDK = True except Exception: diff --git a/ansible_collections/cisco/ucs/plugins/modules/ucs_disk_group_policy.py b/ansible_collections/cisco/ucs/plugins/modules/ucs_disk_group_policy.py index 86d7eaca1..aa3d34319 100644 --- a/ansible_collections/cisco/ucs/plugins/modules/ucs_disk_group_policy.py +++ b/ansible_collections/cisco/ucs/plugins/modules/ucs_disk_group_policy.py @@ -26,6 +26,7 @@ options: - If C(absent), will verify that the disk group policy is absent and will delete if needed. choices: [present, absent] default: present + type: str name: description: - The name of the disk group policy. @@ -33,6 +34,7 @@ options: - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)." - You cannot change this name after the policy is created. required: yes + type: str description: description: - The user-defined description of the storage profile. @@ -40,6 +42,7 @@ options: - "You can use any characters or spaces except the following:" - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)." aliases: [ descr ] + type: str raid_level: description: - "The RAID level for the disk group policy. This can be one of the following:" @@ -52,6 +55,7 @@ options: - "stripe-dual-parity-stripe - RAID 60 Striped Dual Parity and Striped" choices: [stripe, mirror, mirror-stripe, stripe-parity, stripe-dual-parity, stripe-parity-stripe, stripe-dual-parity-stripe] default: stripe + type: str configuration_mode: description: - "Disk group configuration mode. Choose one of the following:" @@ -59,12 +63,14 @@ options: - "manual - Enables you to manually configure the disks in the disk group." choices: [automatic, manual] default: automatic + type: str num_drives: description: - Specify the number of drives for the disk group. - This can be from 0 to 24. - Option only applies when configuration mode is automatic. - default: 1 + default: '1' + type: str drive_type: description: - Specify the drive type to use in the drive group. @@ -75,96 +81,114 @@ options: - Option only applies when configuration mode is automatic. choices: [unspecified, HDD, SSD] default: unspecified + type: str num_ded_hot_spares: description: - Specify the number of hot spares for the disk group. - This can be from 0 to 24. - Option only applies when configuration mode is automatic. default: unspecified + type: str num_glob_hot_spares: description: - Specify the number of global hot spares for the disk group. - This can be from 0 to 24. - Option only applies when configuration mode is automatic. default: unspecified + type: str min_drive_size: description: - Specify the minimum drive size or unspecified to allow all drive sizes. - This can be from 0 to 10240 GB. - Option only applies when configuration mode is automatic. default: 'unspecified' + type: str use_remaining_disks: description: - Specifies whether you can use all the remaining disks in the disk group or not. - Option only applies when configuration mode is automatic. choices: ['yes', 'no'] default: 'no' + type: str manual_disks: description: - List of manually configured disks. - Options are only used when you choose manual configuration_mode. + type: list + elements: dict suboptions: - name: - description: - - The name of the local LUN. - required: yes slot_num: description: - The slot number of the specific disk. + type: str + required: yes role: description: - "The role of the disk. This can be one of the following:" - "normal - Normal" - "ded-hot-spare - Dedicated Hot Spare" - "glob-hot-spare - Glob Hot Spare" + choices: [normal, ded-hot-spare, glob-hot-spare] + default: normal + type: str span_id: description: - The Span ID of the specific disk. default: 'unspecified' + type: str state: description: - If C(present), will verify disk slot is configured within policy. If C(absent), will verify disk slot is absent from policy. choices: [ present, absent ] default: present + type: str virtual_drive: description: - Configuration of virtual drive options. + type: dict suboptions: access_policy: description: - Configure access policy to virtual drive. choices: [blocked, hidden, platform-default, read-only, read-write, transport-ready] default: platform-default + type: str drive_cache: description: - Configure drive caching. choices: [disable, enable, no-change, platform-default] default: platform-default + type: str io_policy: description: - Direct or Cached IO path. choices: [cached, direct, platform-default] default: platform-default + type: str read_policy: description: - Read access policy to virtual drive. choices: [normal, platform-default, read-ahead] default: platform-default + type: str strip_size: description: - Virtual drive strip size. - choices: [ present, absent ] + choices: [1024KB, 128KB, 16KB, 256KB, 32KB, 512KB, 64KB, 8KB, platform-default] default: platform-default + type: str write_cache_policy: description: - Write back cache policy. choices: [always-write-back, platform-default, write-back-good-bbu, write-through] default: platform-default + type: str org_dn: description: - The distinguished name (dn) of the organization where the resource is assigned. default: org-root + type: str requirements: - ucsmsdk author: @@ -173,7 +197,6 @@ author: - CiscoUcs (@CiscoUcs) - Brett Johnson (@sdbrett) - John McDonough (@movinalot) -version_added: '2.8' ''' EXAMPLES = r''' @@ -224,19 +247,15 @@ RETURN = r''' # ''' -from ucsmsdk.mometa.lstorage.LstorageDiskGroupConfigPolicy import LstorageDiskGroupConfigPolicy -from ucsmsdk.mometa.lstorage.LstorageDiskGroupQualifier import LstorageDiskGroupQualifier -from ucsmsdk.mometa.lstorage.LstorageLocalDiskConfigRef import LstorageLocalDiskConfigRef -from ucsmsdk.mometa.lstorage.LstorageVirtualDriveDef import LstorageVirtualDriveDef from ansible.module_utils.basic import AnsibleModule from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec def configure_disk_policy(ucs, module, dn): - # from ucsmsdk.mometa.lstorage.LstorageDiskGroupConfigPolicy import LstorageDiskGroupConfigPolicy - # from ucsmsdk.mometa.lstorage.LstorageDiskGroupQualifier import LstorageDiskGroupQualifier - # from ucsmsdk.mometa.lstorage.LstorageLocalDiskConfigRef import LstorageLocalDiskConfigRef + from ucsmsdk.mometa.lstorage.LstorageDiskGroupConfigPolicy import LstorageDiskGroupConfigPolicy + from ucsmsdk.mometa.lstorage.LstorageDiskGroupQualifier import LstorageDiskGroupQualifier + from ucsmsdk.mometa.lstorage.LstorageLocalDiskConfigRef import LstorageLocalDiskConfigRef if not module.check_mode: try: @@ -333,7 +352,8 @@ def check_virtual_drive_props(ucs, module, dn): def _configure_virtual_drive(module, mo): - # from ucsmsdk.mometa.lstorage.LstorageVirtualDriveDef import LstorageVirtualDriveDef + from ucsmsdk.mometa.lstorage.LstorageVirtualDriveDef import LstorageVirtualDriveDef + LstorageVirtualDriveDef(parent_mo_or_dn=mo, **module.params['virtual_drive']) @@ -369,7 +389,7 @@ def main(): argument_spec.update( org_dn=dict(type='str', default='org-root'), name=dict(type='str', required=True), - description=dict(type='str', aliases=['descr'], default=''), + description=dict(type='str', aliases=['descr']), raid_level=dict( type='str', default='stripe', diff --git a/ansible_collections/cisco/ucs/plugins/modules/ucs_dns_server.py b/ansible_collections/cisco/ucs/plugins/modules/ucs_dns_server.py index 5271cacc5..c016a38bd 100644 --- a/ansible_collections/cisco/ucs/plugins/modules/ucs_dns_server.py +++ b/ansible_collections/cisco/ucs/plugins/modules/ucs_dns_server.py @@ -84,7 +84,6 @@ EXAMPLES = r''' RETURN = r''' # ''' -from ucsmsdk.mometa.comm.CommDnsProvider import CommDnsProvider from ansible.module_utils.basic import AnsibleModule from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec @@ -109,7 +108,7 @@ def run_module(): # UCSModule verifies ucsmsdk is present and exits on failure. # Imports are below for UCS object creation. ucs = UCSModule(module) - # from ucsmsdk.mometa.comm.CommDnsProvider import CommDnsProvider + from ucsmsdk.mometa.comm.CommDnsProvider import CommDnsProvider err = False changed = False diff --git a/ansible_collections/cisco/ucs/plugins/modules/ucs_server_maintenance.py b/ansible_collections/cisco/ucs/plugins/modules/ucs_server_maintenance.py index a8aca9432..83a66f6f3 100644 --- a/ansible_collections/cisco/ucs/plugins/modules/ucs_server_maintenance.py +++ b/ansible_collections/cisco/ucs/plugins/modules/ucs_server_maintenance.py @@ -50,7 +50,7 @@ options: choices: [on-next-boot] uptime_disr: description: - - When a Server profile is associated with a Server, or when changes are made to a Server profile that is already associated with a Server, you must reboot the Server to complete the process. + - When a Server profile is associated with a Server, or when changes are made to an associated Server profile, you must reboot the Server. - The Reboot Policy field determines when the reboot occurs for Server associated with any Server profiles that include this maintenance policy. choices: [immediate, timer-automatic, user-ack] required: true diff --git a/ansible_collections/cisco/ucs/plugins/modules/ucs_wwn_pool.py b/ansible_collections/cisco/ucs/plugins/modules/ucs_wwn_pool.py index 9751ebcb4..af0c17886 100644 --- a/ansible_collections/cisco/ucs/plugins/modules/ucs_wwn_pool.py +++ b/ansible_collections/cisco/ucs/plugins/modules/ucs_wwn_pool.py @@ -24,6 +24,7 @@ options: - If C(absent), will verify WWNNs/WWPNs are absent and will delete if needed. choices: [present, absent] default: present + type: str name: description: - The name of the World Wide Node Name (WWNN) or World Wide Port Name (WWPN) pool. @@ -31,12 +32,14 @@ options: - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)." - You cannot change this name after the WWNN or WWPN pool is created. required: yes + type: str purpose: description: - Specify whether this is a node (WWNN) or port (WWPN) pool. - Optional if state is absent. choices: [node, port] required: yes + type: str description: description: - A description of the WWNN or WWPN pool. @@ -44,6 +47,7 @@ options: - "You can use any characters or spaces except the following:" - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)." aliases: [ descr ] + type: str order: description: - The Assignment Order field. @@ -52,10 +56,12 @@ options: - "sequential - Cisco UCS Manager selects the lowest available identity from the pool." choices: [default, sequential] default: default + type: str first_addr: description: - The first initiator in the World Wide Name (WWN) block. - This is the From field in the UCS Manager Add WWN Blocks menu. + type: str last_addr: description: - The last initiator in the World Wide Name (WWN) block. @@ -63,10 +69,12 @@ options: - For WWxN pools, the pool size must be a multiple of ports-per-node + 1. - For example, if there are 7 ports per node, the pool size must be a multiple of 8. - If there are 63 ports per node, the pool size must be a multiple of 64. + type: str org_dn: description: - Org dn (distinguished name) default: org-root + type: str requirements: - ucsmsdk author: |