nttmcp / nttmcp.mcp / 1.0.9 / module / snapshot_preview Create and migrate local and remote Snapshot Preview servers | "added in version" 2.10.0 of nttmcp.mcp" Authors: Ken Sinfield (@kensinfield) preview | supported by NTT Ltd.nttmcp.mcp.snapshot_preview (1.0.9) — module
Install with ansible-galaxy collection install nttmcp.mcp:==1.0.9
collections: - name: nttmcp.mcp version: 1.0.9
Create and migrate local and remote Snapshot Preview servers
Refer to the Snapshot service documentation at https://docs.mcp-services.net/x/DoBk
Documentation for creating a Preview server via the Cloud Control UI https://docs.mcp-services.net/x/GIBk
- hosts: 127.0.0.1 connection: local collections: - nttmcp.mcp tasks: - name: Create (but don't migrate) a Preview Server in the same datacenter with NICs disconnected snapshot_preview: region: na datacenter: NA9 id: 112b7faa-ffff-ffff-ffff-dc273085cbe4 name: My_Preview_Server description: A new server from a snapshot wait_for_vmtools: True migrate: True - name: Create and migrate a Replicated Preview Server in a remote datacenter with NICs connected snapshot_preview: region: na datacenter: NA12 network_domain: My_Remote_CND id: 222b7faa-ffff-ffff-ffff-dc273085cbe5 name: My_Replicated_Server description: A new server from a replicated snapshot connect_network: True preserve_mac: True migrate: True networks: - nic: 0 vlan: my_remote_vlan privateIpv4: 10.0.0.100 - nic: 1 vlan: my_other_remote_vlan
id: description: - The UUID of the source snapshot to use required: true 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 name: description: - The name of the server required: true type: str wait: default: true description: - Should Ansible wait for the task to complete before continuing required: false type: bool start: default: false description: - Whether to start the Preview server after creation required: false type: bool region: default: na description: - The geographical region required: false type: str cluster: description: - The name of the cluster when the server is being deployed in a multi-cluster environment - This argument can typically be ignored in public MCPs required: false type: str migrate: default: false description: - Initiate an immediate migration of the Preview server to production following the deployment - If the Preview server is local to the same datacenter as the source, the source should be shutdown before - the migrate or the NICs shoulf be left disconnected (default) required: false type: bool networks: description: - List of dictionary objects containing network information when creating remote/replicated Preview server elements: dict required: false suboptions: ipv4_address: description: - The new IPv4 address to assign to this NIC - If absent the next available IP address will be assigned from the subnet associated with the VLAN required: false type: str nic: description: - Used for NIC identification. NIC ID/number from the original base server required: true type: int vlan: description: - The VLAN from the destination datacenter to use for this NIC required: true type: str type: list wait_time: default: 1800 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 description: description: - The description of the VLAN required: false type: str connect_nics: default: false description: - Should the Preview server NICs be connected - To avoid IP address conflicts with the original base server this should be set to False or the original - server should be shutdown first required: false type: bool preserve_mac: default: false description: - Whether to keep the same MAC address as the original base server - To avoid layer 2 issues with the original base server this should be set to False or the original server - should be shutdown first required: false type: bool network_domain: description: - The name of the Cloud Network Domain required: false 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 wait_poll_interval: default: 30 description: - The time in between checking the status of the task in seconds required: false type: int
data: description: Server objects returned: when wait is False sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str msg: description: Message on completion returned: when wait is True sample: The Snapshot Preview Server has successfully been deployed type: str