diff --git a/plugins/modules/cs_account.py b/plugins/modules/cs_account.py index a6ac551..e0a6a95 100644 --- a/plugins/modules/cs_account.py +++ b/plugins/modules/cs_account.py @@ -99,7 +99,7 @@ EXAMPLES = ''' - name: create an account in domain 'CUSTOMERS' - cs_account: + ngine_io.cloudstack.cs_account: name: customer_xy username: customer_xy password: S3Cur3 @@ -109,42 +109,39 @@ domain: CUSTOMERS role: Domain Admin - - name: Lock an existing account in domain 'CUSTOMERS' - cs_account: + ngine_io.cloudstack.cs_account: name: customer_xy domain: CUSTOMERS state: locked - - name: Disable an existing account in domain 'CUSTOMERS' - cs_account: + ngine_io.cloudstack.cs_account: name: customer_xy domain: CUSTOMERS state: disabled - - name: Enable an existing account in domain 'CUSTOMERS' - cs_account: + ngine_io.cloudstack.cs_account: name: customer_xy domain: CUSTOMERS state: enabled - name: Remove an account in domain 'CUSTOMERS' - cs_account: + ngine_io.cloudstack.cs_account: name: customer_xy domain: CUSTOMERS state: absent - name: Create a single user LDAP account in domain 'CUSTOMERS' - cs_account: + ngine_io.cloudstack.cs_account: name: customer_xy username: customer_xy domain: CUSTOMERS ldap_domain: cn=customer_xy,cn=team_xy,ou=People,dc=domain,dc=local - name: Create a LDAP account in domain 'CUSTOMERS' and bind it to a LDAP group - cs_account: + ngine_io.cloudstack.cs_account: name: team_xy username: customer_xy domain: CUSTOMERS diff --git a/plugins/modules/cs_affinitygroup.py b/plugins/modules/cs_affinitygroup.py index e91dbf7..051305d 100644 --- a/plugins/modules/cs_affinitygroup.py +++ b/plugins/modules/cs_affinitygroup.py @@ -59,12 +59,12 @@ EXAMPLES = ''' - name: Create a affinity group - cs_affinitygroup: + ngine_io.cloudstack.cs_affinitygroup: name: haproxy affinity_type: host anti-affinity - name: Remove a affinity group - cs_affinitygroup: + ngine_io.cloudstack.cs_affinitygroup: name: haproxy state: absent ''' diff --git a/plugins/modules/cs_cluster.py b/plugins/modules/cs_cluster.py index 46f07bc..4fb7806 100644 --- a/plugins/modules/cs_cluster.py +++ b/plugins/modules/cs_cluster.py @@ -112,29 +112,26 @@ EXAMPLES = ''' - name: Ensure a cluster is present - cs_cluster: + ngine_io.cloudstack.cs_cluster: name: kvm-cluster-01 zone: ch-zrh-ix-01 hypervisor: KVM cluster_type: CloudManaged - - name: Ensure a cluster is disabled - cs_cluster: + ngine_io.cloudstack.cs_cluster: name: kvm-cluster-01 zone: ch-zrh-ix-01 state: disabled - - name: Ensure a cluster is enabled - cs_cluster: + ngine_io.cloudstack.cs_cluster: name: kvm-cluster-01 zone: ch-zrh-ix-01 state: enabled - - name: Ensure a cluster is absent - cs_cluster: + ngine_io.cloudstack.cs_cluster: name: kvm-cluster-01 zone: ch-zrh-ix-01 state: absent diff --git a/plugins/modules/cs_configuration.py b/plugins/modules/cs_configuration.py index f5e693c..a92da01 100644 --- a/plugins/modules/cs_configuration.py +++ b/plugins/modules/cs_configuration.py @@ -54,27 +54,24 @@ EXAMPLES = ''' - name: Ensure global configuration - cs_configuration: + ngine_io.cloudstack.cs_configuration: name: router.reboot.when.outofband.migrated value: false - - name: Ensure zone configuration - cs_configuration: + ngine_io.cloudstack.cs_configuration: name: router.reboot.when.outofband.migrated zone: ch-gva-01 value: true - - name: Ensure storage configuration - cs_configuration: + ngine_io.cloudstack.cs_configuration: name: storage.overprovisioning.factor storage: storage01 value: 2.0 - - name: Ensure account configuration - cs_configuration: + ngine_io.cloudstack.cs_configuration: name: allow.public.user.templates value: false account: acme inc diff --git a/plugins/modules/cs_disk_offering.py b/plugins/modules/cs_disk_offering.py index cea769b..aebf6b3 100644 --- a/plugins/modules/cs_disk_offering.py +++ b/plugins/modules/cs_disk_offering.py @@ -104,24 +104,22 @@ EXAMPLES = ''' - name: Create a disk offering with local storage - cs_disk_offering: + ngine_io.cloudstack.cs_disk_offering: name: small display_text: Small 10GB disk_size: 10 storage_type: local - - name: Create or update a disk offering with shared storage - cs_disk_offering: + ngine_io.cloudstack.cs_disk_offering: name: small display_text: Small 10GB disk_size: 10 storage_type: shared storage_tags: SAN01 - - name: Remove a disk offering - cs_disk_offering: + ngine_io.cloudstack.cs_disk_offering: name: small state: absent ''' diff --git a/plugins/modules/cs_domain.py b/plugins/modules/cs_domain.py index 4b997a7..d5c6c51 100644 --- a/plugins/modules/cs_domain.py +++ b/plugins/modules/cs_domain.py @@ -49,19 +49,17 @@ EXAMPLES = ''' - name: Create a domain - cs_domain: + ngine_io.cloudstack.cs_domain: path: ROOT/customers network_domain: customers.example.com - - name: Create another subdomain - cs_domain: + ngine_io.cloudstack.cs_domain: path: ROOT/customers/xy network_domain: xy.customers.example.com - - name: Remove a domain - cs_domain: + ngine_io.cloudstack.cs_domain: path: ROOT/customers/xy state: absent ''' diff --git a/plugins/modules/cs_facts.py b/plugins/modules/cs_facts.py index 4e2e4f7..3f11602 100644 --- a/plugins/modules/cs_facts.py +++ b/plugins/modules/cs_facts.py @@ -40,15 +40,15 @@ EXAMPLES = ''' # Gather all facts on instances - name: Gather cloudstack facts - cs_facts: + ngine_io.cloudstack.cs_facts: # Gather specific fact on instances - name: Gather cloudstack facts - cs_facts: filter=cloudstack_instance_id + ngine_io.cloudstack.cs_facts: filter=cloudstack_instance_id # Gather specific fact on instances with a given meta_data_host - name: Gather cloudstack facts - cs_facts: + ngine_io.cloudstack.cs_facts: filter: cloudstack_instance_id meta_data_host: 169.254.169.254 ''' diff --git a/plugins/modules/cs_firewall.py b/plugins/modules/cs_firewall.py index 0e728c5..8fb09c8 100644 --- a/plugins/modules/cs_firewall.py +++ b/plugins/modules/cs_firewall.py @@ -107,14 +107,13 @@ EXAMPLES = ''' - name: Allow inbound port 80/tcp from 1.2.3.4 to 4.3.2.1 - cs_firewall: + ngine_io.cloudstack.cs_firewall: ip_address: 4.3.2.1 port: 80 cidr: 1.2.3.4/32 - - name: Allow inbound tcp/udp port 53 to 4.3.2.1 - cs_firewall: + ngine_io.cloudstack.cs_firewall: ip_address: 4.3.2.1 port: 53 protocol: '{{ item }}' @@ -122,25 +121,22 @@ - tcp - udp - - name: Ensure firewall rule is removed - cs_firewall: + ngine_io.cloudstack.cs_firewall: ip_address: 4.3.2.1 start_port: 8000 end_port: 8888 cidr: 17.0.0.0/8 state: absent - - name: Allow all outbound traffic - cs_firewall: + ngine_io.cloudstack.cs_firewall: network: my_network type: egress protocol: all - - name: Allow only HTTP outbound traffic for an IP - cs_firewall: + ngine_io.cloudstack.cs_firewall: network: my_network type: egress port: 80 diff --git a/plugins/modules/cs_host.py b/plugins/modules/cs_host.py index a7ac9db..a532f42 100644 --- a/plugins/modules/cs_host.py +++ b/plugins/modules/cs_host.py @@ -80,7 +80,7 @@ EXAMPLES = ''' - name: Ensure a host is present but disabled - cs_host: + ngine_io.cloudstack.cs_host: name: pod01.zone01.example.com cluster: vcenter.example.com/zone01/cluster01 pod: pod01 @@ -91,23 +91,20 @@ - perf - gpu - - name: Ensure an existing host is disabled - cs_host: + ngine_io.cloudstack.cs_host: name: pod01.zone01.example.com zone: zone01 allocation_state: disabled - - name: Ensure an existing host is enabled - cs_host: + ngine_io.cloudstack.cs_host: name: pod01.zone01.example.com zone: zone01 allocation_state: enabled - - name: Ensure a host is absent - cs_host: + ngine_io.cloudstack.cs_host: name: pod01.zone01.example.com zone: zone01 state: absent diff --git a/plugins/modules/cs_image_store.py b/plugins/modules/cs_image_store.py index 212be96..154a2db 100644 --- a/plugins/modules/cs_image_store.py +++ b/plugins/modules/cs_image_store.py @@ -61,7 +61,7 @@ EXAMPLES = ''' - name: Add a Image Store (NFS) - cs_image_store: + ngine_io.cloudstack.cs_image_store: zone: zone-01 name: nfs-01 provider: NFS @@ -70,16 +70,15 @@ # Change the NFS share URL and force a Image Store recreation - name: Change the NFS url - cs_image_store: + ngine_io.cloudstack.cs_image_store: zone: zone-01 name: nfs-01 provider: NFS force_recreate: yes url: nfs://192.168.21.10/shares/secondary - - name: delete the image store - cs_image_store: + ngine_io.cloudstack.cs_image_store: name: nfs-01 zone: zone-01 state: absent diff --git a/plugins/modules/cs_instance.py b/plugins/modules/cs_instance.py index 0297ba7..7bfd84c 100644 --- a/plugins/modules/cs_instance.py +++ b/plugins/modules/cs_instance.py @@ -195,7 +195,7 @@ EXAMPLES = ''' # NOTE: Names of offerings and ISOs depending on the CloudStack configuration. - name: create a instance from an ISO - cs_instance: + ngine_io.cloudstack.cs_instance: name: web-vm-1 iso: Linux Debian 7 64-bit hypervisor: VMware @@ -209,19 +209,17 @@ - Sync Integration - Storage Integration - - name: for changing a running instance, use the 'force' parameter - cs_instance: + ngine_io.cloudstack.cs_instance: name: web-vm-1 display_name: web-vm-01.example.com iso: Linux Debian 7 64-bit service_offering: 2cpu_2gb force: yes - # NOTE: user_data can be used to kickstart the instance using cloud-init yaml config. - name: create or update a instance on Exoscale's public cloud using display_name. - cs_instance: + ngine_io.cloudstack.cs_instance: display_name: web-vm-1 template: Linux Debian 7 64-bit service_offering: Tiny @@ -236,9 +234,8 @@ packages: - nginx - - name: create an instance with multiple interfaces specifying the IP addresses - cs_instance: + ngine_io.cloudstack.cs_instance: name: web-vm-1 template: Linux Debian 7 64-bit service_offering: Tiny @@ -248,21 +245,18 @@ - network: NetworkB ip: 192.0.2.1 - - name: ensure an instance is stopped - cs_instance: + ngine_io.cloudstack.cs_instance: name: web-vm-1 state: stopped - - name: ensure an instance is running - cs_instance: + ngine_io.cloudstack.cs_instance: name: web-vm-1 state: started - - name: remove an instance - cs_instance: + ngine_io.cloudstack.cs_instance: name: web-vm-1 state: absent ''' diff --git a/plugins/modules/cs_instance_info.py b/plugins/modules/cs_instance_info.py index 262d2b9..5544337 100644 --- a/plugins/modules/cs_instance_info.py +++ b/plugins/modules/cs_instance_info.py @@ -40,7 +40,7 @@ EXAMPLES = ''' - name: Gather instance information - cs_instance_info: + ngine_io.cloudstack.cs_instance_info: name: web-vm-1 register: vm @@ -48,9 +48,8 @@ debug: msg: "{{ vm }}" - - name: Gather information from all instances - cs_instance_info: + ngine_io.cloudstack.cs_instance_info: register: vms - name: Show information on all instances diff --git a/plugins/modules/cs_instance_nic.py b/plugins/modules/cs_instance_nic.py index a0c90ba..17e3db7 100644 --- a/plugins/modules/cs_instance_nic.py +++ b/plugins/modules/cs_instance_nic.py @@ -72,20 +72,18 @@ EXAMPLES = ''' - name: Add a nic on another network - cs_instance_nic: + ngine_io.cloudstack.cs_instance_nic: vm: privnet network: privNetForBasicZone - - name: Ensure IP address on a nic - cs_instance_nic: + ngine_io.cloudstack.cs_instance_nic: vm: privnet ip_address: 10.10.11.32 network: privNetForBasicZone - - name: Remove a secondary nic - cs_instance_nic: + ngine_io.cloudstack.cs_instance_nic: vm: privnet state: absent network: privNetForBasicZone diff --git a/plugins/modules/cs_instance_nic_secondaryip.py b/plugins/modules/cs_instance_nic_secondaryip.py index 0d2a7bd..6fb87e6 100644 --- a/plugins/modules/cs_instance_nic_secondaryip.py +++ b/plugins/modules/cs_instance_nic_secondaryip.py @@ -72,23 +72,20 @@ EXAMPLES = ''' - name: Assign a specific IP to the default NIC of the VM - cs_instance_nic_secondaryip: + ngine_io.cloudstack.cs_instance_nic_secondaryip: vm: customer_xy vm_guest_ip: 10.10.10.10 - # Note: If vm_guest_ip is not set, you will get a new IP address on every run. - name: Assign an IP to the default NIC of the VM - cs_instance_nic_secondaryip: + ngine_io.cloudstack.cs_instance_nic_secondaryip: vm: customer_xy - - name: Remove a specific IP from the default NIC - cs_instance_nic_secondaryip: + ngine_io.cloudstack.cs_instance_nic_secondaryip: vm: customer_xy vm_guest_ip: 10.10.10.10 state: absent - ''' RETURN = ''' diff --git a/plugins/modules/cs_instance_password_reset.py b/plugins/modules/cs_instance_password_reset.py index 75424cd..faf960f 100644 --- a/plugins/modules/cs_instance_password_reset.py +++ b/plugins/modules/cs_instance_password_reset.py @@ -52,13 +52,12 @@ EXAMPLES = ''' - name: stop the virtual machine before resetting the password - cs_instance: + ngine_io.cloudstack.cs_instance: name: myvirtualmachine state: stopped - - name: reset and get new default password - cs_instance_password_reset: + ngine_io.cloudstack.cs_instance_password_reset: vm: myvirtualmachine register: root @@ -66,10 +65,9 @@ msg: "new default password is {{ root.password }}" - name: boot the virtual machine to activate the new password - cs_instance: + ngine_io.cloudstack.cs_instance: name: myvirtualmachine state: started - when: root is changed ''' diff --git a/plugins/modules/cs_instancegroup.py b/plugins/modules/cs_instancegroup.py index 06d1e07..a857a0e 100644 --- a/plugins/modules/cs_instancegroup.py +++ b/plugins/modules/cs_instancegroup.py @@ -45,12 +45,11 @@ EXAMPLES = ''' - name: Create an instance group - cs_instancegroup: + ngine_io.cloudstack.cs_instancegroup: name: loadbalancers - - name: Remove an instance group - cs_instancegroup: + ngine_io.cloudstack.cs_instancegroup: name: loadbalancers state: absent ''' diff --git a/plugins/modules/cs_ip_address.py b/plugins/modules/cs_ip_address.py index 89fcc64..77acc83 100644 --- a/plugins/modules/cs_ip_address.py +++ b/plugins/modules/cs_ip_address.py @@ -78,29 +78,26 @@ EXAMPLES = ''' - name: Associate an IP address conditionally - cs_ip_address: + ngine_io.cloudstack.cs_ip_address: network: My Network register: ip_address when: instance.public_ip is undefined - - name: Disassociate an IP address - cs_ip_address: + ngine_io.cloudstack.cs_ip_address: ip_address: 1.2.3.4 state: absent - - name: Associate an IP address with tags - cs_ip_address: + ngine_io.cloudstack.cs_ip_address: network: My Network tags: - key: myCustomID - value: 5510c31a-416e-11e8-9013-02000a6b00bf register: ip_address - - name: Disassociate an IP address with tags - cs_ip_address: + ngine_io.cloudstack.cs_ip_address: state: absent tags: - key: myCustomID diff --git a/plugins/modules/cs_iso.py b/plugins/modules/cs_iso.py index 24f196a..89d2eac 100644 --- a/plugins/modules/cs_iso.py +++ b/plugins/modules/cs_iso.py @@ -112,28 +112,25 @@ EXAMPLES = ''' - name: Register an ISO if ISO name does not already exist - cs_iso: + ngine_io.cloudstack.cs_iso: name: Debian 7 64-bit url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso os_type: Debian GNU/Linux 7(64-bit) - - name: Register an ISO with given name if ISO md5 checksum does not already exist - cs_iso: + ngine_io.cloudstack.cs_iso: name: Debian 7 64-bit url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso os_type: Debian GNU/Linux 7(64-bit) checksum: 0b31bccccb048d20b551f70830bb7ad0 - - name: Remove an ISO by name - cs_iso: + ngine_io.cloudstack.cs_iso: name: Debian 7 64-bit state: absent - - name: Remove an ISO by checksum - cs_iso: + ngine_io.cloudstack.cs_iso: name: Debian 7 64-bit checksum: 0b31bccccb048d20b551f70830bb7ad0 state: absent diff --git a/plugins/modules/cs_loadbalancer_rule.py b/plugins/modules/cs_loadbalancer_rule.py index 40e662f..d1857a3 100644 --- a/plugins/modules/cs_loadbalancer_rule.py +++ b/plugins/modules/cs_loadbalancer_rule.py @@ -116,25 +116,23 @@ EXAMPLES = ''' - name: Create a load balancer rule - cs_loadbalancer_rule: + ngine_io.cloudstack.cs_loadbalancer_rule: name: balance_http public_ip: 1.2.3.4 algorithm: leastconn public_port: 80 private_port: 8080 - - name: Update algorithm of an existing load balancer rule - cs_loadbalancer_rule: + ngine_io.cloudstack.cs_loadbalancer_rule: name: balance_http public_ip: 1.2.3.4 algorithm: roundrobin public_port: 80 private_port: 8080 - - name: Delete a load balancer rule - cs_loadbalancer_rule: + ngine_io.cloudstack.cs_loadbalancer_rule: name: balance_http public_ip: 1.2.3.4 state: absent diff --git a/plugins/modules/cs_loadbalancer_rule_member.py b/plugins/modules/cs_loadbalancer_rule_member.py index a4c1f4b..8dac082 100644 --- a/plugins/modules/cs_loadbalancer_rule_member.py +++ b/plugins/modules/cs_loadbalancer_rule_member.py @@ -70,15 +70,14 @@ EXAMPLES = ''' - name: Add VMs to an existing load balancer - cs_loadbalancer_rule_member: + ngine_io.cloudstack.cs_loadbalancer_rule_member: name: balance_http vms: - web01 - web02 - - name: Remove a VM from an existing load balancer - cs_loadbalancer_rule_member: + ngine_io.cloudstack.cs_loadbalancer_rule_member: name: balance_http vms: - web01 @@ -91,16 +90,15 @@ serial: 1 pre_tasks: - name: Remove from load balancer - cs_loadbalancer_rule_member: + ngine_io.cloudstack.cs_loadbalancer_rule_member: name: balance_http vm: "{{ ansible_hostname }}" state: absent - tasks: # Perform update post_tasks: - name: Add to load balancer - cs_loadbalancer_rule_member: + ngine_io.cloudstack.cs_loadbalancer_rule_member: name: balance_http vm: "{{ ansible_hostname }}" state: present diff --git a/plugins/modules/cs_network.py b/plugins/modules/cs_network.py index 7cce877..3221c31 100644 --- a/plugins/modules/cs_network.py +++ b/plugins/modules/cs_network.py @@ -156,15 +156,14 @@ EXAMPLES = ''' - name: Create a network - cs_network: + ngine_io.cloudstack.cs_network: name: my network zone: gva-01 network_offering: DefaultIsolatedNetworkOfferingWithSourceNatService network_domain: example.com - - name: Create a VPC tier - cs_network: + ngine_io.cloudstack.cs_network: name: my VPC tier 1 zone: gva-01 vpc: my VPC @@ -173,23 +172,20 @@ netmask: 255.255.255.0 acl: my web acl - - name: Update a network - cs_network: + ngine_io.cloudstack.cs_network: name: my network display_text: network of domain example.local network_domain: example.local - - name: Restart a network with clean up - cs_network: + ngine_io.cloudstack.cs_network: name: my network clean_up: yes state: restarted - - name: Remove a network - cs_network: + ngine_io.cloudstack.cs_network: name: my network state: absent ''' diff --git a/plugins/modules/cs_network_acl.py b/plugins/modules/cs_network_acl.py index b93edb4..f013874 100644 --- a/plugins/modules/cs_network_acl.py +++ b/plugins/modules/cs_network_acl.py @@ -65,14 +65,13 @@ EXAMPLES = ''' - name: create a network ACL - cs_network_acl: + ngine_io.cloudstack.cs_network_acl: name: Webserver ACL description: a more detailed description of the ACL vpc: customers - - name: remove a network ACL - cs_network_acl: + ngine_io.cloudstack.cs_network_acl: name: Webserver ACL vpc: customers state: absent diff --git a/plugins/modules/cs_network_acl_rule.py b/plugins/modules/cs_network_acl_rule.py index 373d0cd..4761ea7 100644 --- a/plugins/modules/cs_network_acl_rule.py +++ b/plugins/modules/cs_network_acl_rule.py @@ -125,7 +125,7 @@ EXAMPLES = ''' - name: create a network ACL rule, allow port 80 ingress - cs_network_acl_rule: + ngine_io.cloudstack.cs_network_acl_rule: network_acl: web rule_position: 1 vpc: my vpc @@ -134,9 +134,8 @@ port: 80 cidr: 0.0.0.0/0 - - name: create a network ACL rule, deny port range 8000-9000 ingress for 10.20.0.0/16 and 10.22.0.0/16 - cs_network_acl_rule: + ngine_io.cloudstack.cs_network_acl_rule: network_acl: web rule_position: 1 vpc: my vpc @@ -148,9 +147,8 @@ - 10.20.0.0/16 - 10.22.0.0/16 - - name: remove a network ACL rule - cs_network_acl_rule: + ngine_io.cloudstack.cs_network_acl_rule: network_acl: web rule_position: 1 vpc: my vpc diff --git a/plugins/modules/cs_network_offering.py b/plugins/modules/cs_network_offering.py index eee5177..c12158b 100644 --- a/plugins/modules/cs_network_offering.py +++ b/plugins/modules/cs_network_offering.py @@ -120,7 +120,7 @@ EXAMPLES = ''' - name: Create a network offering and enable it - cs_network_offering: + ngine_io.cloudstack.cs_network_offering: name: my_network_offering display_text: network offering description state: enabled @@ -130,10 +130,8 @@ - { service: 'dns', provider: 'virtualrouter' } - { service: 'dhcp', provider: 'virtualrouter' } - - - name: Remove a network offering - cs_network_offering: + ngine_io.cloudstack.cs_network_offering: name: my_network_offering state: absent ''' diff --git a/plugins/modules/cs_physical_network.py b/plugins/modules/cs_physical_network.py index 5f3caeb..0519c14 100644 --- a/plugins/modules/cs_physical_network.py +++ b/plugins/modules/cs_physical_network.py @@ -88,24 +88,24 @@ EXAMPLES = ''' - name: Ensure a network is present - cs_physical_network: + ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 isolation_method: VLAN broadcast_domain_range: ZONE - name: Set a tag on a network - cs_physical_network: + ngine_io.cloudstack.cs_physical_network: name: net01 tag: overlay - name: Remove tag on a network - cs_physical_network: + ngine_io.cloudstack.cs_physical_network: name: net01 tag: "" - name: Ensure a network is enabled with specific nsps enabled - cs_physical_network: + ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 isolation_method: VLAN @@ -118,19 +118,19 @@ - vpcvirtualrouter - name: Ensure a network is disabled - cs_physical_network: + ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 state: disabled - name: Ensure a network is enabled - cs_physical_network: + ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 state: enabled - name: Ensure a network is absent - cs_physical_network: + ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 state: absent diff --git a/plugins/modules/cs_pod.py b/plugins/modules/cs_pod.py index c5e558e..01a369b 100644 --- a/plugins/modules/cs_pod.py +++ b/plugins/modules/cs_pod.py @@ -61,30 +61,27 @@ EXAMPLES = ''' - name: Ensure a pod is present - cs_pod: + ngine_io.cloudstack.cs_pod: name: pod1 zone: ch-zrh-ix-01 start_ip: 10.100.10.101 gateway: 10.100.10.1 netmask: 255.255.255.0 - - name: Ensure a pod is disabled - cs_pod: + ngine_io.cloudstack.cs_pod: name: pod1 zone: ch-zrh-ix-01 state: disabled - - name: Ensure a pod is enabled - cs_pod: + ngine_io.cloudstack.cs_pod: name: pod1 zone: ch-zrh-ix-01 state: enabled - - name: Ensure a pod is absent - cs_pod: + ngine_io.cloudstack.cs_pod: name: pod1 zone: ch-zrh-ix-01 state: absent diff --git a/plugins/modules/cs_portforward.py b/plugins/modules/cs_portforward.py index 5945fcb..1009c1f 100644 --- a/plugins/modules/cs_portforward.py +++ b/plugins/modules/cs_portforward.py @@ -110,33 +110,30 @@ EXAMPLES = ''' - name: 1.2.3.4:80 -> web01:8080 - cs_portforward: + ngine_io.cloudstack.cs_portforward: ip_address: 1.2.3.4 vm: web01 public_port: 80 private_port: 8080 - - name: forward SSH and open firewall - cs_portforward: + ngine_io.cloudstack.cs_portforward: ip_address: '{{ public_ip }}' vm: '{{ inventory_hostname }}' public_port: '{{ ansible_ssh_port }}' private_port: 22 open_firewall: true - - name: forward DNS traffic, but do not open firewall - cs_portforward: + ngine_io.cloudstack.cs_portforward: ip_address: 1.2.3.4 vm: '{{ inventory_hostname }}' public_port: 53 private_port: 53 protocol: udp - - name: remove ssh port forwarding - cs_portforward: + ngine_io.cloudstack.cs_portforward: ip_address: 1.2.3.4 public_port: 22 private_port: 22 diff --git a/plugins/modules/cs_project.py b/plugins/modules/cs_project.py index 9919b98..5b19dee 100644 --- a/plugins/modules/cs_project.py +++ b/plugins/modules/cs_project.py @@ -57,33 +57,29 @@ EXAMPLES = ''' - name: Create a project - cs_project: + ngine_io.cloudstack.cs_project: name: web tags: - { key: admin, value: john } - { key: foo, value: bar } - - name: Rename a project - cs_project: + ngine_io.cloudstack.cs_project: name: web display_text: my web project - - name: Suspend an existing project - cs_project: + ngine_io.cloudstack.cs_project: name: web state: suspended - - name: Activate an existing project - cs_project: + ngine_io.cloudstack.cs_project: name: web state: active - - name: Remove a project - cs_project: + ngine_io.cloudstack.cs_project: name: web state: absent ''' diff --git a/plugins/modules/cs_region.py b/plugins/modules/cs_region.py index 24a26c4..c032fe5 100644 --- a/plugins/modules/cs_region.py +++ b/plugins/modules/cs_region.py @@ -44,14 +44,13 @@ EXAMPLES = ''' - name: create a region - cs_region: + ngine_io.cloudstack.cs_region: id: 2 name: geneva endpoint: https://cloud.gva.example.com - - name: remove a region with ID 2 - cs_region: + ngine_io.cloudstack.cs_region: id: 2 state: absent ''' diff --git a/plugins/modules/cs_resourcelimit.py b/plugins/modules/cs_resourcelimit.py index 7cad943..4f0e294 100644 --- a/plugins/modules/cs_resourcelimit.py +++ b/plugins/modules/cs_resourcelimit.py @@ -59,14 +59,13 @@ EXAMPLES = ''' - name: Update a resource limit for instances of a domain - cs_resourcelimit: + ngine_io.cloudstack.cs_resourcelimit: type: instance limit: 10 domain: customers - - name: Update a resource limit for instances of an account - cs_resourcelimit: + ngine_io.cloudstack.cs_resourcelimit: type: instance limit: 12 account: moserre diff --git a/plugins/modules/cs_role.py b/plugins/modules/cs_role.py index 4344055..9f02bac 100644 --- a/plugins/modules/cs_role.py +++ b/plugins/modules/cs_role.py @@ -50,18 +50,16 @@ EXAMPLES = ''' - name: Ensure an user role is present - cs_role: + ngine_io.cloudstack.cs_role: name: myrole_user - - name: Ensure a role having particular ID is named as myrole_user - cs_role: + ngine_io.cloudstack.cs_role: name: myrole_user id: 04589590-ac63-4ffc-93f5-b698b8ac38b6 - - name: Ensure a role is absent - cs_role: + ngine_io.cloudstack.cs_role: name: myrole_user state: absent ''' diff --git a/plugins/modules/cs_role_permission.py b/plugins/modules/cs_role_permission.py index 1298cbc..3ec43f5 100644 --- a/plugins/modules/cs_role_permission.py +++ b/plugins/modules/cs_role_permission.py @@ -53,29 +53,26 @@ EXAMPLES = ''' - name: Create a role permission - cs_role_permission: + ngine_io.cloudstack.cs_role_permission: role: My_Custom_role name: createVPC permission: allow description: My comments - - name: Remove a role permission - cs_role_permission: + ngine_io.cloudstack.cs_role_permission: state: absent role: My_Custom_role name: createVPC - - name: Update a system role permission - cs_role_permission: + ngine_io.cloudstack.cs_role_permission: role: Domain Admin name: createVPC permission: deny - - name: Update rules order. Move the rule at the top of list - cs_role_permission: + ngine_io.cloudstack.cs_role_permission: role: Domain Admin name: createVPC parent: 0 diff --git a/plugins/modules/cs_router.py b/plugins/modules/cs_router.py index 0b9faf1..f788254 100644 --- a/plugins/modules/cs_router.py +++ b/plugins/modules/cs_router.py @@ -62,34 +62,30 @@ # Ensure the router has the desired service offering, no matter if # the router is running or not. - name: Present router - cs_router: + ngine_io.cloudstack.cs_router: name: r-40-VM service_offering: System Offering for Software Router - - name: Ensure started - cs_router: + ngine_io.cloudstack.cs_router: name: r-40-VM state: started - # Ensure started with desired service offering. # If the service offerings changes, router will be rebooted. - name: Ensure started with desired service offering - cs_router: + ngine_io.cloudstack.cs_router: name: r-40-VM service_offering: System Offering for Software Router state: started - - name: Ensure stopped - cs_router: + ngine_io.cloudstack.cs_router: name: r-40-VM state: stopped - - name: Remove a router - cs_router: + ngine_io.cloudstack.cs_router: name: r-40-VM state: absent ''' diff --git a/plugins/modules/cs_securitygroup.py b/plugins/modules/cs_securitygroup.py index 369209a..37a0280 100644 --- a/plugins/modules/cs_securitygroup.py +++ b/plugins/modules/cs_securitygroup.py @@ -49,13 +49,12 @@ EXAMPLES = ''' - name: create a security group - cs_securitygroup: + ngine_io.cloudstack.cs_securitygroup: name: default description: default security group - - name: remove a security group - cs_securitygroup: + ngine_io.cloudstack.cs_securitygroup: name: default state: absent ''' diff --git a/plugins/modules/cs_securitygroup_rule.py b/plugins/modules/cs_securitygroup_rule.py index c2bba3b..6c5b8a3 100644 --- a/plugins/modules/cs_securitygroup_rule.py +++ b/plugins/modules/cs_securitygroup_rule.py @@ -81,14 +81,13 @@ EXAMPLES = ''' --- - name: allow inbound port 80/tcp from 1.2.3.4 added to security group 'default' - cs_securitygroup_rule: + ngine_io.cloudstack.cs_securitygroup_rule: security_group: default port: 80 cidr: 1.2.3.4/32 - - name: allow tcp/udp outbound added to security group 'default' - cs_securitygroup_rule: + ngine_io.cloudstack.cs_securitygroup_rule: security_group: default type: egress start_port: 1 @@ -98,24 +97,21 @@ - tcp - udp - - name: allow inbound icmp from 0.0.0.0/0 added to security group 'default' - cs_securitygroup_rule: + ngine_io.cloudstack.cs_securitygroup_rule: security_group: default protocol: icmp icmp_code: -1 icmp_type: -1 - - name: remove rule inbound port 80/tcp from 0.0.0.0/0 from security group 'default' - cs_securitygroup_rule: + ngine_io.cloudstack.cs_securitygroup_rule: security_group: default port: 80 state: absent - - name: allow inbound port 80/tcp from security group web added to security group 'default' - cs_securitygroup_rule: + ngine_io.cloudstack.cs_securitygroup_rule: security_group: default port: 80 user_security_group: web diff --git a/plugins/modules/cs_service_offering.py b/plugins/modules/cs_service_offering.py index 9304cfe..1b078cf 100644 --- a/plugins/modules/cs_service_offering.py +++ b/plugins/modules/cs_service_offering.py @@ -168,7 +168,7 @@ EXAMPLES = ''' - name: Create a non-volatile compute service offering with local storage - cs_service_offering: + ngine_io.cloudstack.cs_service_offering: name: Micro display_text: Micro 512mb 1cpu cpu_number: 1 @@ -177,9 +177,8 @@ host_tags: eco storage_type: local - - name: Create a volatile compute service offering with shared storage - cs_service_offering: + ngine_io.cloudstack.cs_service_offering: name: Tiny display_text: Tiny 1gb 1cpu cpu_number: 1 @@ -190,9 +189,8 @@ host_tags: eco storage_tags: eco - - name: Create or update a volatile compute service offering with shared storage - cs_service_offering: + ngine_io.cloudstack.cs_service_offering: name: Tiny display_text: Tiny 1gb 1cpu cpu_number: 1 @@ -203,9 +201,8 @@ host_tags: eco storage_tags: eco - - name: Create or update a custom compute service offering - cs_service_offering: + ngine_io.cloudstack.cs_service_offering: name: custom display_text: custom compute offer is_customized: yes @@ -213,15 +210,13 @@ host_tags: eco storage_tags: eco - - name: Remove a compute service offering - cs_service_offering: + ngine_io.cloudstack.cs_service_offering: name: Tiny state: absent - - name: Create or update a system offering for the console proxy - cs_service_offering: + ngine_io.cloudstack.cs_service_offering: name: System Offering for Console Proxy 2GB display_text: System Offering for Console Proxy 2GB RAM is_system: yes @@ -232,9 +227,8 @@ storage_type: shared storage_tags: perf - - name: Remove a system offering - cs_service_offering: + ngine_io.cloudstack.cs_service_offering: name: System Offering for Console Proxy 2GB is_system: yes state: absent diff --git a/plugins/modules/cs_snapshot_policy.py b/plugins/modules/cs_snapshot_policy.py index 279fd44..12367ed 100644 --- a/plugins/modules/cs_snapshot_policy.py +++ b/plugins/modules/cs_snapshot_policy.py @@ -95,40 +95,36 @@ EXAMPLES = ''' - name: ensure a snapshot policy daily at 1h00 UTC - cs_snapshot_policy: + ngine_io.cloudstack.cs_snapshot_policy: volume: ROOT-478 schedule: '00:1' max_snaps: 3 - - name: ensure a snapshot policy daily at 1h00 UTC on the second DATADISK of VM web-01 - cs_snapshot_policy: + ngine_io.cloudstack.cs_snapshot_policy: vm: web-01 volume_type: DATADISK device_id: 2 schedule: '00:1' max_snaps: 3 - - name: ensure a snapshot policy hourly at minute 5 UTC - cs_snapshot_policy: + ngine_io.cloudstack.cs_snapshot_policy: volume: ROOT-478 schedule: '5' interval_type: hourly max_snaps: 1 - - name: ensure a snapshot policy weekly on Sunday at 05h00, TZ Europe/Zurich - cs_snapshot_policy: + ngine_io.cloudstack.cs_snapshot_policy: volume: ROOT-478 schedule: '00:5:1' interval_type: weekly max_snaps: 1 time_zone: 'Europe/Zurich' - - name: ensure a snapshot policy is absent - cs_snapshot_policy: + ngine_io.cloudstack.cs_snapshot_policy: volume: ROOT-478 interval_type: hourly state: absent diff --git a/plugins/modules/cs_sshkeypair.py b/plugins/modules/cs_sshkeypair.py index 9fc22ce..e256c03 100644 --- a/plugins/modules/cs_sshkeypair.py +++ b/plugins/modules/cs_sshkeypair.py @@ -51,21 +51,20 @@ EXAMPLES = ''' - name: create a new private / public key pair - cs_sshkeypair: + ngine_io.cloudstack.cs_sshkeypair: name: linus@example.com - register: key + - debug: msg: 'Private key is {{ key.private_key }}' - name: remove a public key by its name - cs_sshkeypair: + ngine_io.cloudstack.cs_sshkeypair: name: linus@example.com state: absent - - name: register your existing local public key - cs_sshkeypair: + ngine_io.cloudstack.cs_sshkeypair: name: linus@example.com public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}" ''' diff --git a/plugins/modules/cs_staticnat.py b/plugins/modules/cs_staticnat.py index 0d209d9..9e68c5c 100644 --- a/plugins/modules/cs_staticnat.py +++ b/plugins/modules/cs_staticnat.py @@ -72,13 +72,12 @@ EXAMPLES = ''' - name: Create a static NAT for IP 1.2.3.4 to web01 - cs_staticnat: + ngine_io.cloudstack.cs_staticnat: ip_address: 1.2.3.4 vm: web01 - - name: Remove a static NAT - cs_staticnat: + ngine_io.cloudstack.cs_staticnat: ip_address: 1.2.3.4 state: absent ''' diff --git a/plugins/modules/cs_storage_pool.py b/plugins/modules/cs_storage_pool.py index 6d7cd96..fa7c181 100644 --- a/plugins/modules/cs_storage_pool.py +++ b/plugins/modules/cs_storage_pool.py @@ -93,7 +93,7 @@ EXAMPLES = ''' - name: ensure a zone scoped storage_pool is present - cs_storage_pool: + ngine_io.cloudstack.cs_storage_pool: zone: zone01 storage_url: rbd://admin:SECRET@ceph-mons.domain/poolname provider: DefaultPrimary @@ -101,9 +101,8 @@ scope: zone hypervisor: KVM - - name: ensure a cluster scoped storage_pool is disabled - cs_storage_pool: + ngine_io.cloudstack.cs_storage_pool: name: Ceph RBD zone: zone01 cluster: cluster01 @@ -113,9 +112,8 @@ scope: cluster allocation_state: disabled - - name: ensure a cluster scoped storage_pool is in maintenance - cs_storage_pool: + ngine_io.cloudstack.cs_storage_pool: name: Ceph RBD zone: zone01 cluster: cluster01 @@ -125,9 +123,8 @@ scope: cluster allocation_state: maintenance - - name: ensure a storage_pool is absent - cs_storage_pool: + ngine_io.cloudstack.cs_storage_pool: name: Ceph RBD state: absent ''' diff --git a/plugins/modules/cs_template.py b/plugins/modules/cs_template.py index fc3129a..7a96c92 100644 --- a/plugins/modules/cs_template.py +++ b/plugins/modules/cs_template.py @@ -185,7 +185,7 @@ EXAMPLES = ''' - name: register a systemvm template - cs_template: + ngine_io.cloudstack.cs_template: name: systemvm-vmware-4.5 url: "http://packages.shapeblue.com/systemvmtemplate/4.5/systemvm64template-4.5-vmware.ova" hypervisor: VMware @@ -193,9 +193,8 @@ cross_zones: yes os_type: Debian GNU/Linux 7(64-bit) - - name: Create a template from a stopped virtual machine's volume - cs_template: + ngine_io.cloudstack.cs_template: name: Debian 9 (64-bit) 20GB ({{ ansible_date_time.date }}) vm: debian-9-base-vm os_type: Debian GNU/Linux 9 (64-bit) @@ -206,7 +205,7 @@ # Note: Use template_find_option(s) when a template name is not unique - name: Create a template from a stopped virtual machine's volume - cs_template: + ngine_io.cloudstack.cs_template: name: Debian 9 (64-bit) display_text: Debian 9 (64-bit) 20GB ({{ ansible_date_time.date }}) template_find_option: display_text @@ -216,9 +215,8 @@ password_enabled: yes is_public: yes - - name: create a template from a virtual machine's root volume snapshot - cs_template: + ngine_io.cloudstack.cs_template: name: Debian 9 (64-bit) Snapshot ROOT-233_2015061509114 snapshot: ROOT-233_2015061509114 os_type: Debian GNU/Linux 9 (64-bit) @@ -226,9 +224,8 @@ password_enabled: yes is_public: yes - - name: Remove a template - cs_template: + ngine_io.cloudstack.cs_template: name: systemvm-4.2 cross_zones: yes state: absent diff --git a/plugins/modules/cs_traffic_type.py b/plugins/modules/cs_traffic_type.py index e2a88dd..d34c942 100644 --- a/plugins/modules/cs_traffic_type.py +++ b/plugins/modules/cs_traffic_type.py @@ -16,7 +16,6 @@ - Add, remove, update Traffic Types associated with CloudStack Physical Networks. extends_documentation_fragment: - ngine_io.cloudstack.cloudstack - author: - Patryk Cichy (@PatTheSilent) options: @@ -80,22 +79,20 @@ EXAMPLES = ''' - name: add a traffic type - cs_traffic_type: + ngine_io.cloudstack.cs_traffic_type: physical_network: public-network traffic_type: Guest zone: test-zone - - name: update traffic type - cs_traffic_type: + ngine_io.cloudstack.cs_traffic_type: physical_network: public-network traffic_type: Guest kvm_networklabel: cloudbr0 zone: test-zone - - name: remove traffic type - cs_traffic_type: + ngine_io.cloudstack.cs_traffic_type: physical_network: public-network traffic_type: Public state: absent diff --git a/plugins/modules/cs_user.py b/plugins/modules/cs_user.py index 4c9f894..332b7ce 100644 --- a/plugins/modules/cs_user.py +++ b/plugins/modules/cs_user.py @@ -80,7 +80,7 @@ EXAMPLES = ''' - name: Create an user in domain 'CUSTOMERS' - cs_user: + ngine_io.cloudstack.cs_user: account: developers username: johndoe password: S3Cur3 @@ -89,30 +89,26 @@ email: john.doe@example.com domain: CUSTOMERS - - name: Lock an existing user in domain 'CUSTOMERS' - cs_user: + ngine_io.cloudstack.cs_user: username: johndoe domain: CUSTOMERS state: locked - - name: Disable an existing user in domain 'CUSTOMERS' - cs_user: + ngine_io.cloudstack.cs_user: username: johndoe domain: CUSTOMERS state: disabled - - name: Enable/unlock an existing user in domain 'CUSTOMERS' - cs_user: + ngine_io.cloudstack.cs_user: username: johndoe domain: CUSTOMERS state: enabled - - name: Remove an user in domain 'CUSTOMERS' - cs_user: + ngine_io.cloudstack.cs_user: name: customer_xy domain: CUSTOMERS state: absent diff --git a/plugins/modules/cs_vlan_ip_range.py b/plugins/modules/cs_vlan_ip_range.py index dbd431c..0bb8b57 100644 --- a/plugins/modules/cs_vlan_ip_range.py +++ b/plugins/modules/cs_vlan_ip_range.py @@ -110,7 +110,7 @@ EXAMPLES = ''' - name: create a VLAN IP range for network test - cs_vlan_ip_range: + ngine_io.cloudstack.cs_vlan_ip_range: network: test vlan: 98 start_ip: 10.2.4.10 @@ -119,9 +119,8 @@ netmask: 255.255.255.0 zone: zone-02 - - name: remove a VLAN IP range for network test - cs_vlan_ip_range: + ngine_io.cloudstack.cs_vlan_ip_range: state: absent network: test start_ip: 10.2.4.10 diff --git a/plugins/modules/cs_vmsnapshot.py b/plugins/modules/cs_vmsnapshot.py index eab9d16..34b19bd 100644 --- a/plugins/modules/cs_vmsnapshot.py +++ b/plugins/modules/cs_vmsnapshot.py @@ -75,21 +75,19 @@ EXAMPLES = ''' - name: Create a VM snapshot of disk and memory before an upgrade - cs_vmsnapshot: + ngine_io.cloudstack.cs_vmsnapshot: name: Snapshot before upgrade vm: web-01 snapshot_memory: yes - - name: Revert a VM to a snapshot after a failed upgrade - cs_vmsnapshot: + ngine_io.cloudstack.cs_vmsnapshot: name: Snapshot before upgrade vm: web-01 state: revert - - name: Remove a VM snapshot after successful upgrade - cs_vmsnapshot: + ngine_io.cloudstack.cs_vmsnapshot: name: Snapshot before upgrade vm: web-01 state: absent diff --git a/plugins/modules/cs_volume.py b/plugins/modules/cs_volume.py index d367f13..2430c34 100644 --- a/plugins/modules/cs_volume.py +++ b/plugins/modules/cs_volume.py @@ -97,7 +97,6 @@ state: description: - State of the volume. - - The choices C(extracted) and C(uploaded) were added in version 2.8. type: str default: present choices: [ present, absent, attached, detached, extracted, uploaded ] @@ -137,45 +136,39 @@ EXAMPLES = ''' - name: create volume within project and zone with specified storage options - cs_volume: + ngine_io.cloudstack.cs_volume: name: web-vm-1-volume project: Integration zone: ch-zrh-ix-01 disk_offering: PerfPlus Storage size: 20 - - name: create/attach volume to instance - cs_volume: + ngine_io.cloudstack.cs_volume: name: web-vm-1-volume disk_offering: PerfPlus Storage size: 20 vm: web-vm-1 state: attached - - name: detach volume - cs_volume: + ngine_io.cloudstack.cs_volume: name: web-vm-1-volume state: detached - - name: remove volume - cs_volume: + ngine_io.cloudstack.cs_volume: name: web-vm-1-volume state: absent - -# New in version 2.8 - name: Extract DATA volume to make it downloadable - cs_volume: + ngine_io.cloudstack.cs_volume: state: extracted name: web-vm-1-volume register: data_vol_out - - name: Create new volume by downloading source volume - cs_volume: + ngine_io.cloudstack.cs_volume: state: uploaded name: web-vm-1-volume-2 format: VHD diff --git a/plugins/modules/cs_vpc.py b/plugins/modules/cs_vpc.py index c2e0bbb..d0240b2 100644 --- a/plugins/modules/cs_vpc.py +++ b/plugins/modules/cs_vpc.py @@ -93,28 +93,25 @@ EXAMPLES = ''' - name: Ensure a VPC is present but not started after creating - cs_vpc: + ngine_io.cloudstack.cs_vpc: name: my_vpc display_text: My example VPC cidr: 10.10.0.0/16 state: stopped - - name: Ensure a VPC is present and started after creating - cs_vpc: + ngine_io.cloudstack.cs_vpc: name: my_vpc display_text: My example VPC cidr: 10.10.0.0/16 - - name: Ensure a VPC is absent - cs_vpc: + ngine_io.cloudstack.cs_vpc: name: my_vpc state: absent - - name: Ensure a VPC is restarted with clean up - cs_vpc: + ngine_io.cloudstack.cs_vpc: name: my_vpc clean_up: yes state: restarted diff --git a/plugins/modules/cs_vpc_offering.py b/plugins/modules/cs_vpc_offering.py index 1e6810d..16d058f 100644 --- a/plugins/modules/cs_vpc_offering.py +++ b/plugins/modules/cs_vpc_offering.py @@ -61,7 +61,7 @@ EXAMPLES = ''' - name: Create a vpc offering and enable it - cs_vpc_offering: + ngine_io.cloudstack.cs_vpc_offering: name: my_vpc_offering display_text: vpc offering description state: enabled @@ -70,9 +70,8 @@ - {service: 'dns', provider: 'VpcVirtualRouter'} - {service: 'dhcp', provider: 'VpcVirtualRouter'} - - name: Create a vpc offering with redundant router - cs_vpc_offering: + ngine_io.cloudstack.cs_vpc_offering: name: my_vpc_offering display_text: vpc offering description supported_services: [ Dns, Dhcp, SourceNat ] @@ -83,9 +82,8 @@ service_capabilities: - {service: 'SourceNat', capabilitytype: 'RedundantRouter', capabilityvalue: true} - - name: Create a region level vpc offering with distributed router - cs_vpc_offering: + ngine_io.cloudstack.cs_vpc_offering: name: my_vpc_offering display_text: vpc offering description state: present @@ -98,9 +96,8 @@ - {service: 'Connectivity', capabilitytype: 'DistributedRouter', capabilityvalue: true} - {service: 'Connectivity', capabilitytype: 'RegionLevelVPC', capabilityvalue: true} - - name: Remove a vpc offering - cs_vpc_offering: + ngine_io.cloudstack.cs_vpc_offering: name: my_vpc_offering state: absent ''' diff --git a/plugins/modules/cs_vpn_connection.py b/plugins/modules/cs_vpn_connection.py index cd6442b..29d285e 100644 --- a/plugins/modules/cs_vpn_connection.py +++ b/plugins/modules/cs_vpn_connection.py @@ -72,20 +72,18 @@ EXAMPLES = r''' - name: Create a VPN connection with activated VPN gateway - cs_vpn_connection: + ngine_io.cloudstack.cs_vpn_connection: vpn_customer_gateway: my vpn connection vpc: my vpc - - name: Create a VPN connection and force VPN gateway activation - cs_vpn_connection: + ngine_io.cloudstack.cs_vpn_connection: vpn_customer_gateway: my vpn connection vpc: my vpc force: yes - - name: Remove a vpn connection - cs_vpn_connection: + ngine_io.cloudstack.cs_vpn_connection: vpn_customer_gateway: my vpn connection vpc: my vpc state: absent diff --git a/plugins/modules/cs_vpn_customer_gateway.py b/plugins/modules/cs_vpn_customer_gateway.py index df52856..31728c6 100644 --- a/plugins/modules/cs_vpn_customer_gateway.py +++ b/plugins/modules/cs_vpn_customer_gateway.py @@ -96,7 +96,7 @@ EXAMPLES = r''' - name: Create a vpn customer gateway - cs_vpn_customer_gateway: + ngine_io.cloudstack.cs_vpn_customer_gateway: name: my vpn customer gateway cidrs: - 192.168.123.0/24 @@ -106,9 +106,8 @@ ike_policy: aes256-sha1;modp1536 ipsec_psk: "S3cr3Tk3Y" - - name: Remove a vpn customer gateway - cs_vpn_customer_gateway: + ngine_io.cloudstack.cs_vpn_customer_gateway: name: my vpn customer gateway state: absent ''' diff --git a/plugins/modules/cs_vpn_gateway.py b/plugins/modules/cs_vpn_gateway.py index c066bfb..d9adebe 100644 --- a/plugins/modules/cs_vpn_gateway.py +++ b/plugins/modules/cs_vpn_gateway.py @@ -55,12 +55,11 @@ EXAMPLES = ''' - name: Ensure a vpn gateway is present - cs_vpn_gateway: + ngine_io.cloudstack.cs_vpn_gateway: vpc: my VPC - - name: Ensure a vpn gateway is absent - cs_vpn_gateway: + ngine_io.cloudstack.cs_vpn_gateway: vpc: my VPC state: absent ''' diff --git a/plugins/modules/cs_zone.py b/plugins/modules/cs_zone.py index 1d69aa5..48d99d2 100644 --- a/plugins/modules/cs_zone.py +++ b/plugins/modules/cs_zone.py @@ -94,27 +94,24 @@ EXAMPLES = ''' - name: Ensure a zone is present - cs_zone: + ngine_io.cloudstack.cs_zone: name: ch-zrh-ix-01 dns1: 8.8.8.8 dns2: 8.8.4.4 network_type: basic - - name: Ensure a zone is disabled - cs_zone: + ngine_io.cloudstack.cs_zone: name: ch-zrh-ix-01 state: disabled - - name: Ensure a zone is enabled - cs_zone: + ngine_io.cloudstack.cs_zone: name: ch-zrh-ix-01 state: enabled - - name: Ensure a zone is absent - cs_zone: + ngine_io.cloudstack.cs_zone: name: ch-zrh-ix-01 state: absent ''' diff --git a/plugins/modules/cs_zone_info.py b/plugins/modules/cs_zone_info.py index d63a217..8922c15 100644 --- a/plugins/modules/cs_zone_info.py +++ b/plugins/modules/cs_zone_info.py @@ -28,20 +28,18 @@ EXAMPLES = ''' - name: Gather information from a zone - cs_zone_info: + ngine_io.cloudstack.cs_zone_info: zone: ch-gva-1 register: zone - - name: Show the returned results of the registered variable debug: msg: "{{ zone }}" - name: Gather information from all zones - cs_zone_info: + ngine_io.cloudstack.cs_zone_info: register: zones - - name: Show information on all zones debug: msg: "{{ zones }}"