--- - debug: msg: "START ce_lacp presented integration tests on connection={{ ansible_connection }}" - name: present the provided configuration with the exisiting running configuration ce_lacp: &present mode: Dynamic trunk_id: 10 preempt_enable: True state_flapping: True port_id_extension_enable: True unexpected_mac_disable: True system_id: 1111-2222-3333 timeout_type: Fast fast_timeout: 12 mixed_rate_link_enable: True preempt_delay: 12 collector_delay: 12 max_active_linknumber: 2 select: Prority priority: 23 global_priority: 123 register: result - name: Assert the configuration is reflected on host assert: that: - "result['changed'] == true" - name: Get lacp config by ce_netconf. ce_netconf: rpc: get cfg_xml: " Eth-Trunk10 " register: result_ifs_presentd - name: Get global lacp config by ce_netconf. ce_netconf: rpc: get cfg_xml: " " register: result_global_presentd - name: present the provided configuration with the existing running configuration (IDEMPOTENT) ce_lacp: *present register: result_re_presentd - name: Assert that the previous task was idempotent assert: that: - "result_re_presentd.changed == false" - "'Dynamic' == result_ifs_presentd.end_state.result" - "'true' == result_ifs_presentd.end_state.result" - "'Fast' == result_ifs_presentd.end_state.result" - "'12' == result_ifs_presentd.end_state.result" - "'Prority' == result_ifs_presentd.end_state.result" - "'12' == result_ifs_presentd.end_state.result" - "'2' == result_ifs_presentd.end_state.result" - "'12' in result_ifs_presentd.end_state.result" - "'true' in result_ifs_presentd.end_state.result" - "'true' in result_ifs_presentd.end_state.result" - "'true' in result_ifs_presentd.end_state.result" - "'true' in result_ifs_presentd.end_state.result" - "'true' in result_ifs_presentd.end_state.result" - "'1111-2222-3333' in result_global_presentd.end_state.result" - "'123' in result_global_presentd.end_state.result" # after present, it should be deleted - include_tasks: delete.yaml - debug: msg: "END ce_lacp presentd integration tests on connection={{ ansible_connection }}"