--- - name: ALWAYS_CHANGES Test adding a firewall address-list mt_ip_firewall_addresslist: hostname: "{{ mt_hostname }}" username: "{{ mt_user }}" password: "{{ mt_pass }}" state: "present" list_name: test_list address_list: - address: 192.168.1.2 comment: dns1 - address: 192.168.1.3 comment: dns2 - address: 192.168.1.6 comment: test_comment3 register: address_list_add_1 failed_when: ( not ansible_check_mode ) and ( not ( address_list_add_1 | changed ) ) - name: ALWAYS_CHANGES Test editing a firewall address-list mt_ip_firewall_addresslist: hostname: "{{ mt_hostname }}" username: "{{ mt_user }}" password: "{{ mt_pass }}" state: "present" list_name: test_list address_list: - address: 192.168.1.2 comment: dns1 - address: 192.168.1.3 comment: dns2 - address: 192.168.1.19 comment: test_comment3 register: address_list_edit_1 failed_when: ( not ansible_check_mode ) and ( not ( address_list_edit_1 | changed ) ) - name: Test adding a duplicate address-list mt_ip_firewall_addresslist: hostname: "{{ mt_hostname }}" username: "{{ mt_user }}" password: "{{ mt_pass }}" state: "present" list_name: test_list address_list: - address: 192.168.1.2 comment: dns1 - address: 192.168.1.3 comment: dns2 - address: 192.168.1.19 comment: test_comment3 register: add_address_list_add_dup_1 failed_when: ( not ansible_check_mode ) and ( ( add_address_list_add_dup_1 | changed ) ) - name: ALWAYS_CHANGES Test removing a firewall address-list mt_ip_firewall_addresslist: hostname: "{{ mt_hostname }}" username: "{{ mt_user }}" password: "{{ mt_pass }}" state: "absent" list_name: test_list register: address_list_rem_1 failed_when: ( not ansible_check_mode ) and ( not ( address_list_rem_1 | changed ) )