Cred că am fost la asta de prea mult timp, dar nu pot să-mi dau seama de ce a doua mea cu_articole nu circulă ca primul meu. Am încercat deja să folosesc un json_query ca în prima sarcină, care nu a ajutat.
Sarcină:
- nume: Setați backing_lunuuid
set_fact:
backing_lunuuid: „{{ item | json_query('guest_disk_info.*.backing_lunuuid') }}”
with_items: " {{ rdm_jsondata.results }}"
- depanare:
msg: "{{ backing_lunuuid }}"
- nume: Eliminați backing_lunuuid principal și final pentru a seta disk.UUID
set_fact:
rdm_uuid: „{{ item[10:-12] }}”
with_items: "{{ backing_lunuuid }}"
- depanare:
msg: "{{ rdm_uuid }}"
Prima ieșire de depanare (pentru backing_lunuuid):
SARCINA [depanare] ************************************************ **************************************************** **************************************************** ******************************************
ok: [localhost] => {
"msg": " ['0200110000600507681081007e1800000000000053323134352020', '02000f0000600507681081007e1800000000000051323134352020', '0200150000600507681081007e1800000000000059323134352020', '0200130000600507681081007e1800000000000055323134352020', '0200140000600507681081007e1800000000000056323134352020', '0200240000600507681081007e1800000000000057323134352020', '0200420000600507681081007e1800000000000058323134352020', '0200100000600507681081007e1800000000000052323134352020', '0200120000600507681081007e1800000000000054323134352020']"
A doua ieșire de depanare (pentru rdm_uuid), care nu este în buclă ca prima"
SARCINA [Eliminați backing_lunuuid de început și de sfârșit pentru a seta disc.UUID] ***************************************** **************************************************** ************************************************
ok: [localhost] => (articol=0200110000600507681081007e1800000000000053323134352020)
ok: [localhost] => (articol=02000f0000600507681081007e1800000000000051323134352020)
ok: [localhost] => (articol=0200150000600507681081007e1800000000000059323134352020)
ok: [localhost] => (articol=0200130000600507681081007e1800000000000055323134352020)
ok: [localhost] => (articol=0200140000600507681081007e1800000000000056323134352020)
ok: [localhost] => (articol=0200240000600507681081007e1800000000000057323134352020)
ok: [localhost] => (articol=0200420000600507681081007e1800000000000058323134352020)
ok: [localhost] => (articol=0200100000600507681081007e1800000000000052323134352020)
ok: [localhost] => (articol=0200120000600507681081007e1800000000000054323134352020)
SARCINA [depanare] ************************************************ **************************************************** **************************************************** ******************************************
ok: [localhost] => {
"msg": " 600507681081007e1800000000000054"
Orice ajutor ar fi foarte apreciat.