nttmcp / nttmcp.mcp / 1.0.9 / module / server_disk Alter the disk configuration for an existing server | "added in version" 2.10.0 of nttmcp.mcp" Authors: Ken Sinfield (@kensinfield) preview | supported by NTT Ltd.nttmcp.mcp.server_disk (1.0.9) — module
Install with ansible-galaxy collection install nttmcp.mcp:==1.0.9
collections: - name: nttmcp.mcp version: 1.0.9
Alter the disk configuration for an existing server
The controller must exist before trying to add a disk of that type. E.g. If no IDE controller exists on a server,
trying to add a disk here using a controller type of IDE will fail
- hosts: 127.0.0.1 connection: local collections: - nttmcp.mcp tasks: - name: Add a disk to a server server_disk: region: na datacenter: NA12 network_domain: myCND server: myServer01 type: SCSI size: 10 speed: STANDARD state: present - name: Add a Provisioned IOPs disk to a server server_disk: region: na datacenter: NA12 network_domain: myCND server: myServer01 type: SCSI size: 10 speed: PROVISIONEDIOPS iops: 30 state: present start: False - name: Update a disk on a server (PIOPS) server_disk: region: na datacenter: NA12 network_domain: myCND server: myServer01 type: SCSI controller_number: 0 disk_number: 1 speed: PROVISIONEDIOPS size: 100 iops: 1000 state: present - name: Update a disk on a server by controller and disk number server_disk: region: na datacenter: NA12 network_domain: myCND server: myServer01 type: SCSI controller_number: 0 disk_number: 0 speed: STANDARD state: present - name: Delete a disk server_disk: region: na datacenter: NA12 network_domain: myCND name: myServer01 controller_number: 0 disk_number: 1 state: absent
id: description: - The UUID of the disk required: false type: str auth: description: - Optional dictionary containing the authentication and API information for Cloud Control required: false suboptions: api: description: - The Cloud Control API endpoint e.g. api-na.mcp-services.net required: false type: str api_version: description: - The Cloud Control API version e.g. 2.11 required: false type: str password: description: - The Cloud Control API user password required: false type: str username: description: - The Cloud Control API username required: false type: str type: dict iops: description: - The IOPS for the disk as an integer - Only used for PROVISIONEDIOPS - If no value is provided and the current IOPS is less than 3 x - the new disk size a new IOPS count of 3 x the new disk size will be applied. required: false type: int size: description: - The new size of the disk as an integer required: false type: int stop: default: true description: - Should the server be stopped if it is running - Disk operations can only be performed while the server is stopped required: false type: bool type: choices: - SCSI - SATA - IDE default: SCSI description: - The type of controller for this disk required: false type: str wait: default: true description: - Should Ansible wait for the task to complete before continuing required: false type: bool speed: choices: - STANDARD - ECONOMY - HIGHPERFORMANCE - PROVISIONEDIOPS default: STANDARD description: - The new speed of the disk required: false type: str start: default: true description: - Should the server be started after the disk operations have completed required: false type: bool state: choices: - present - absent default: present description: - The action to be performed required: false type: str region: default: na description: - The geographical region required: false type: str server: description: - The name of the server required: true type: str wait_time: default: 1200 description: The maximum time the Ansible should wait for the task to complete in seconds required: false type: int datacenter: description: - The datacenter name required: true type: str disk_number: default: 0 description: - The disk number on the controller as an integer - If no disk number is provided the next free disk on the specified type on the controller will be assumed required: false type: int network_domain: description: - The name of the Cloud Network Domain required: true type: str wait_for_vmtools: default: false description: - Should Ansible wait for VMWare Tools to be running before continuing - This should only be used for server images that are running VMWare Tools - This should not be used for NGOC (Non Guest OS Customization) servers/images required: false type: bool controller_number: default: 0 description: - The controller number on the bus as an integer required: false type: int wait_poll_interval: default: 30 description: - The time in between checking the status of the task in seconds required: false type: int
data: contains: cpu: contains: coresPerSocket: description: The number of cores per CPU socket sample: 1 type: int count: description: The number of CPUs sample: 2 type: int speed: description: The CPU reservation to be applied sample: STANDARD type: str description: The default CPU specifications for the image returned: when state == present and wait is True type: complex createTime: description: The creation date of the server returned: when state == present and wait is True sample: '2019-01-14T11:12:31.000Z' type: str datacenterId: description: Datacenter id/location returned: when state == present and wait is True sample: NA9 type: str deployed: description: Is the server deployed returned: when state == present and wait is True type: bool floppy: contains: driveNumber: description: The drive number sample: 0 type: int id: description: The UUID of the drive sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str key: description: Internal usage sample: 8000 type: int state: description: The state of the drive sample: NORMAL type: str description: List of the attached floppy drives returned: when state == present and wait is True type: complex guest: contains: operatingSystem: contains: displayName: description: The OS display name sample: CENTOS7/64 type: str family: description: The OS family sample: UNIX type: str id: description: The OS UUID sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str osUnitsGroupId: description: The OS billing group sample: CENTOS type: str description: Operating System information type: complex osCustomization: description: Does the image support guest OS customization type: bool vmTools: contains: apiVersion: description: The version of VMWare Tools sample: 9256 type: int runningStatus: description: Is VMWare Tools running sample: NOT_RUNNING type: str type: description: VMWare Tools or Open VM Tools sample: VMWARE_TOOLS type: str versionStatus: description: Additional information sample: NEED_UPGRADE type: str description: VMWare Tools information type: complex description: Information about the guest OS returned: when state == present and wait is True type: complex id: description: The UUID of the server returned: when state == present sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str ideController: contains: adapterType: description: The type of the controller sample: IDE type: str channel: description: The IDE channel number sample: 0 type: int deviceOrDisk: contains: device: contains: id: description: The UUID of the device/disk sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str slot: description: The slot number on the controller used by this device sample: 0 type: int state: description: The state of the device/disk sample: NORMAL type: str type: description: The type of the device/disk sample: CDROM type: str description: Device/Disk object type: complex description: List of the attached devices/disks type: complex id: description: The UUID of the controller sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str key: description: Internal Usage sample: 200 type: int state: description: The state of the controller sample: NORMAL type: str description: List of the server's IDE controllers returned: when state == present and wait is True type: complex memoryGb: description: Server memory in GB returned: when state == present and wait is True sample: 4 type: int name: description: The name of the server returned: when state == present and wait is True sample: my_server type: str networkInfo: contains: networkDomainId: description: The UUID of the Cloud Network Domain the server resides in sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str primaryNic: contains: connected: description: Is the NIC connected type: bool id: description: The UUID of the NIC sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str ipv6: description: The IPv6 address of the server sample: 1111:1111:1111:1111:0:0:0:1 type: str key: description: Internal Usage sample: 4000 type: int macAddress: description: the MAC address sample: aa:aa:aa:aa:aa:aa type: str networkAdapter: description: The VMWare NIC type sample: VMXNET3 type: str privateIpv4: description: The IPv4 address of the server sample: 10.0.0.10 type: str state: description: The state of the NIC sample: NORMAL type: str vlanId: description: the UUID of the VLAN the server resides in sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str vlanName: description: The name of the VLAN the server resides in sample: my_vlan type: str description: The primary NIC on the server type: complex description: Server network information returned: when state == present and wait is True type: complex sataController: contains: adapterType: description: The name of the adapter sample: LSI_LOGIC_SAS type: str busNumber: description: The SCSI bus number sample: 1 type: int disk: contains: id: description: The disk id sample: 112b7faa-ffff-ffff-ffff-dc273085cbe4 type: str scsiId: description: The id of the disk on the SCSI controller sample: 0 type: int sizeGb: description: The initial size of the disk in GB sample: 10 type: int speed: description: The disk speed sample: STANDARD type: str description: List of disks associated with this image type: complex id: description: The SCSI controller id sample: 112b7faa-ffff-ffff-ffff-dc273085cbe4 type: str key: description: Internal use sample: 1000 type: int description: List of SATA controllers on the server returned: when state == present and wait is True type: list scsiController: contains: adapterType: description: The name of the adapter sample: LSI_LOGIC_SAS type: str busNumber: description: The SCSI bus number sample: 1 type: int disk: contains: id: description: The disk id sample: 112b7faa-ffff-ffff-ffff-dc273085cbe4 type: str scsiId: description: The id of the disk on the SCSI controller sample: 0 type: int sizeGb: description: The initial size of the disk in GB sample: 10 type: int speed: description: The disk speed sample: STANDARD type: str description: List of disks associated with this image type: complex id: description: The SCSI controller id sample: 112b7faa-ffff-ffff-ffff-dc273085cbe4 type: str key: description: Internal use sample: 1000 type: int description: List of the SCSI controllers and disk configuration for the image returned: when state == present and wait is True type: complex source: contains: type: description: The id type of the image sample: IMAGE_ID type: str value: description: The UUID of the image sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str description: The source of the image returned: when state == present and wait is True type: complex started: description: Is the server running returned: when state == present and wait is True type: bool state: description: The state of the server returned: when state == present and wait is True sample: NORMAL type: str tag: contains: tagKeyId: description: the UUID of the tag sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str tagKeyName: description: The tag name sample: my_tag type: str value: description: The tag value sample: my_tag_value type: str description: List of informational tags associated with the server returned: when state == present and wait is True type: complex virtualHardware: contains: upToDate: description: Is the VM hardware up to date type: bool version: description: The VM hardware version sample: VMX-10 type: str description: Information on the virtual hardware of the server returned: when state == present and wait is True type: complex description: Server objects returned: success type: complex disk_number: description: The number of the new disk on the controller returned: success when adding a new disk sample: 1 type: int