Tuesday, 2023-03-14

opendevreviewDmitriy Rabotyagov proposed openstack/ansible-collections-openstack master: Fix mistake in compute_flavor_access notes  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/87741817:43
dborgesdHello guys18:56
dborgesdI have a question with this gallaxy collection... I am trying to assign to different NICs to a server during a server build18:58
dborgesdthe playbook is successfull creating both ports, howeevr during the server build only one is assigned to the server19:00
dborgesdnics: "port-name={{ p_create.port.name }},port-name={{ p_create2.port.name }}"19:02
dborgesdthis is the how the nics statement looks like in the playbok19:02
dborgesdam I doing anything wrong?19:02
jrosserdborgesd: i'm not sure that is a yaml list you're using there19:15
jrosserthere is an example here showing nics: https://docs.ansible.com/ansible/latest/collections/openstack/cloud/server_module.html#ansible-collections-openstack-cloud-server-module19:16
dborgesdin 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 dicts19:30
jm1[m]Which version of the ansible openstack collection are you using? 2.0.0 from ansible galaxy?19:34
dborgesdI am running ansible on Z (mainframe) I know that ansible version is 2.9.. let me check the openstack collection version19:40
dborgesdhumm.. not sure if I am going to be able to use 2.0.0 on the env...19:43
dborgesdopenstacksdk version for RHEL8 on Z is 0.4619:43
dborgesd:(19:43
jm1[m]dborgesd: try to split your nics statement across several lines. nics is a list19: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
dborgesdOk. Let me test19:54
dborgesdHi I just tested... and it still replaced the ports20:04
dborgesdit adds the first one and then replaces with the second one20:04
dborgesdboth ports are created... however it seems that the openstack.cloud.server can not attach both.... 20:07
*** dviroel_ is now known as dviroel20:21
jm1[m]strange20:58
jm1[m]try to find out which version of the collection you are using20:58
jm1[m]also try with port-id instead of port-name20:58
jm1[m]pastebin with ansible verbose output could also help to debug this20:59
dborgesdok.. gimme some minutes to test21:09
dborgesdpb is running.. waiting for its results and I will share the outputs (pastebin) with you..21:17
dborgesdin the meantime.. where can I find the versio of the collection I am using?21:18
dborgesdFound it21:48
dborgesdwe are using collection version v1.7.221:49
dborgesdhttps://pastebin.com/zdLdn9ca21:56
dborgesdFollowing the pastebin 21:56
dborgesdit contains the playbook code using port-id as suggested21:56

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!