ngine-io / ansible-collection-cloudstack

CloudStack Ansible Collections
https://galaxy.ansible.com/ngine_io/cloudstack
GNU General Public License v3.0
21 stars 27 forks source link

IPv6 by default when creating an instance #96

Closed John222 closed 2 years ago

John222 commented 2 years ago

Hello @resmo

is it possible to deploy a machine with ipv6 enabled by default? I couldn't find an option to activate it within the ngine_io.cloudstack.cs_instance. Within the exoscale web ui there is a checkbox tick to enable it by default.

resmo commented 2 years ago

These modules are primary targeted to apache cloudstack's API.

Exoscale extended the cloudstack API in a custom way. The optional extended custom param would be ipv6=true which defaults to false (as well as ipv4 which defaults to true and is not changeable).

I remember discussing this with exoscale and my suggestion at that time was to use the details param, which is explicitly there to pass additional params, but I am not sure if this was ever implemented by exoscale.

Could you try:

- name: Create VM with IPv6 enabled
  ngine_io.cloudstack.cs_instance:
    name: my VM
    details:
      ipv6: true
    ...

UPDATE:

tested it without success...

resmo commented 2 years ago

@John222

ah, found it, it works with ip6 (not ipv6):

- name: Create VM with IPv6 enabled
  ngine_io.cloudstack.cs_instance:
    name: my VM
    details:
      ip6: true
    ...
resmo commented 2 years ago

also see https://github.com/ngine-io/ansible-role-exoscale/commit/69b6be0d455a032295f5b95bcc8c6d0ed9b132a9

John222 commented 2 years ago

Hello @resmo it did not worked. It seems, it gets ignored.

resmo commented 2 years ago

please share more infos, did you deploy a fresh vm? update vm? playbook?

John222 commented 2 years ago

I were deploying a new vm. As you mentioned i will try with the ip6 instead the ipv6 parameter.

John222 commented 2 years ago

Good evening @resmo

by changing the parameter to ip6 worked. By deploying a new instance. It will not work for existing instances.