--- - debug: msg="START cli_config/cli_block_replace.yaml on connection={{ ansible_connection }}" - name: setup - remove configuration cli_config: &rm config: "no ip access-list test" diff_match: none - name: block replace cli_config: &block config: "{{ lookup('template', 'basic/configblock.j2') }}" diff_replace: block register: result - assert: that: - "result.changed == true" - name: block replace (Idempotence) cli_config: *block register: result - assert: that: - "result.changed == false" - name: teardown cli_config: *rm - debug: msg="END cli_config/cli_block_replace.yaml on connection={{ ansible_connection }}"