opendevreview | Dmitriy Rabotyagov proposed openstack/ansible-collections-openstack master: Fix mistake in compute_flavor_access notes https://review.opendev.org/c/openstack/ansible-collections-openstack/+/877418 | 17:43 |
---|---|---|
dborgesd | Hello guys | 18:56 |
dborgesd | I have a question with this gallaxy collection... I am trying to assign to different NICs to a server during a server build | 18:58 |
dborgesd | the playbook is successfull creating both ports, howeevr during the server build only one is assigned to the server | 19:00 |
dborgesd | nics: "port-name={{ p_create.port.name }},port-name={{ p_create2.port.name }}" | 19:02 |
dborgesd | this is the how the nics statement looks like in the playbok | 19:02 |
dborgesd | am I doing anything wrong? | 19:02 |
jrosser | dborgesd: i'm not sure that is a yaml list you're using there | 19:15 |
jrosser | there is an example here showing nics: https://docs.ansible.com/ansible/latest/collections/openstack/cloud/server_module.html#ansible-collections-openstack-cloud-server-module | 19:16 |
dborgesd | in my case the difference I see is that I am using port-name instead of port-id and the portname comes from a previously registered variable... | 19:23 |
jm1[m] | nics: ["port-name={{ p_create.port.name }}" , "port-name={{ p_create2.port.name }}"] ? | 19:28 |
jm1[m] | Or:... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/liOoHBfNWUniFwonQQHIzfLa>) | 19:29 |
jm1[m] | Sorry, those list entries are dicts | 19:30 |
jm1[m] | Which version of the ansible openstack collection are you using? 2.0.0 from ansible galaxy? | 19:34 |
dborgesd | I am running ansible on Z (mainframe) I know that ansible version is 2.9.. let me check the openstack collection version | 19:40 |
dborgesd | humm.. not sure if I am going to be able to use 2.0.0 on the env... | 19:43 |
dborgesd | openstacksdk version for RHEL8 on Z is 0.46 | 19:43 |
dborgesd | :( | 19:43 |
jm1[m] | dborgesd: try to split your nics statement across several lines. nics is a list | 19:45 |
jm1[m] | dborgesd: or something like this: nics: [ {'port-name': '{{ p_create.port.name }}'}, {'port-name': '{{ p_create2.port.name }}'} ] | 19:47 |
jm1[m] | we have to fix our server docs... | 19:47 |
dborgesd | Ok. Let me test | 19:54 |
dborgesd | Hi I just tested... and it still replaced the ports | 20:04 |
dborgesd | it adds the first one and then replaces with the second one | 20:04 |
dborgesd | both ports are created... however it seems that the openstack.cloud.server can not attach both.... | 20:07 |
*** dviroel_ is now known as dviroel | 20:21 | |
jm1[m] | strange | 20:58 |
jm1[m] | try to find out which version of the collection you are using | 20:58 |
jm1[m] | also try with port-id instead of port-name | 20:58 |
jm1[m] | pastebin with ansible verbose output could also help to debug this | 20:59 |
dborgesd | ok.. gimme some minutes to test | 21:09 |
dborgesd | pb is running.. waiting for its results and I will share the outputs (pastebin) with you.. | 21:17 |
dborgesd | in the meantime.. where can I find the versio of the collection I am using? | 21:18 |
dborgesd | Found it | 21:48 |
dborgesd | we are using collection version v1.7.2 | 21:49 |
dborgesd | https://pastebin.com/zdLdn9ca | 21:56 |
dborgesd | Following the pastebin | 21:56 |
dborgesd | it contains the playbook code using port-id as suggested | 21:56 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!