Hi,

Here the issuing part of code:
- name: "Check aggregated interface configuration and save the differences"
    ansible.builtin.set_fact: 
       aggregated_interface_configuration_difference: "{{ lines | 
difference(r_aggregated_interface_configuration.stdout_lines | first) }}" 
    vars: 
      lines:
       - inherit port-profile RLB-CLIENT-TRUNK-PO-MEMBER-10G 
       - " description PZB-{{ server_serial_number }}-{{ pizza_box_name }}" 
       - " channel-group {{ port_channel_id }}" 
       - " no snmp trap link-status" 
 - name: "Check difference between the configuration of interfaces and 
targets configurations" 
      ansible.builtin.assert: 
      that: 
       - (po_configuration_difference | length) == 0 
       - (aggregated_interface_configuration_difference | length) == 0 
      fail_msg: "Port-channel for {{ server_serial_number }}-{{ 
pizza_box_name }} duo already exists with wrong configuration, cannot 
create new configuration" 
 - name: "Close session if port-channel and interfaces configurations are 
correct" 
   ansible.builtin.meta: end_play 

- name: "Validate discovered interfaces" 
  run_once: yes 
  delegate_to: localhost 
  any_errors_fatal: yes 
  vars: 
   all_switches_interfaces: "{{ hostvars | dict2items(key_name='host', 
value_name='hostvars') | selectattr('hostvars.interface_without_po_set', 
'defined') | map(attribute='hostvars.interface_without_po_set') | list | 
flatten }}" 
......

Here, the result:
TASK [Check aggregated interface configuration and save the differences] 
*******
skipping: [SWITCH56]
skipping: [SWITCH55]
skipping: [SWITCH58]
skipping: [SWITCH57]
skipping: [SWITCH65]
skipping: [SWITCH66]
ok: [SWITCH64]
ok: [SWITCH63]

TASK [Check difference between the configuration of interfaces and targets 
configurations] ***
skipping: [SWITCH56]
skipping: [SWITCH55]
skipping: [SWITCH57]
skipping: [SWITCH58]
skipping: [SWITCH66]
skipping: [SWITCH65]
ok: [SWITCH64] => {
    "changed": false,
    "msg": "All assertions passed"
}
ok: [SWITCH63] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Validate discovered switch interfaces from switch-side MAC addresses] 
****
ok: [SWITCH56 -> localhost]

As you can see, the task* Check difference between the configuration of 
interfaces and targets configuratio*ns is successfull so just after that 
the meta end play must stop the execution but the playbook continues and 
the next task* Validate discovered switch interfaces from switch-side MAC 
addresses* is played.

So I don't understand.

Best Regards,
Folio Brice Roland
Le mardi 5 juillet 2022 à 20:01:29 UTC+2, Brian Coca a écrit :

> so it is working, the play is ending, it is not being skipped
>
>
> -- 
> ----------
> Brian Coca
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b66e6c0c-42b1-4ee8-a500-60097a6aae8bn%40googlegroups.com.

Reply via email to