Hello
I am looking a way to get catch values from the log of a block execution in order and assign to variables for a second block / module.
Exemple:
Otter Orchestration to create VM.
The name and its IP adress are dynamically created by the ansible script.
##AH:UseTextMode
##AH:Description Deploiement d'une VM à partird'un template
set $octet2=100;
set $octet3=4;
set $YML=linux.yml;
set $template=GI-DCS-UBUNTU-20.04.1-20210121
for server ANSIBLE-MASTER
{
# Loop
foreach $VM in @Range(1, 2)
{
call ANSIBLE::BM-AnsiblePlayBook
(
PLAYBOOK: vmware,
EXTRAVARS: %(octet2:$octet2,octet3:$octet3,template:$template,annotation:$annotation'),
YML: $YML,
Role: NON
);
}
}
The ANSIBLE::BM-Playbook module returns the log:
PLAY [127.0.0.1] ***************************************************************
TASK [Definition du nom de la VM et de son IP] *********************************
changed: [127.0.0.1]
TASK [set_fact] ****************************************************************
ok: [127.0.0.1]
TASK [set_fact] ****************************************************************
ok: [127.0.0.1]
TASK [set_fact] ****************************************************************
ok: [127.0.0.1]
TASK [set_fact] ****************************************************************
ok: [127.0.0.1]
TASK [set_fact] ****************************************************************
ok: [127.0.0.1]
TASK [Creation de la VM VM004011 avec IP 10.100.4.11] **************************
changed: [127.0.0.1]
PLAY RECAP *********************************************************************
127.0.0.1 : ok=7 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Is it possible to get the VM Name (VM004001) and the IP (10.100.4.11) to pass them to some module in the same Otter Orchestration Job ?
call ANSIBLE::BM-AnsiblePlayBook
call SomeOtterModule ($VM,$IP)
Thanks
Philippe