Hi,
I have created iptables ansible roles, which contain rules such as Alias port and Masquerade traffic. I am using molecule to test this role. But whenever I give empty values for those rules, it is working fine. In the scenario, if I pass value to the variables assigned to those rules. I am getting different types of errors. I am testing with docker drivers. For eg., if I give molecule converge
Output look like this
----------------------------------------------------------------------------------------------------------------
TASK [twmn.twmn.iptables : Alias port] *****************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'interfaces' is undefined\n\nThe error appears to be in '/home/hasinianu1217/twmn/ansible/collections/ansible_collections/twmn/twmn/roles/iptables/tasks/rules.yml': line 4, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: Alias port\n ^ here\n"}
CRITICAL Ansible return code was 2, command was: ['ansible-playbook', '--inventory', '/home/hasinianu1217/.cache/molecule/iptables/default/inventory', '--skip-tags', 'molecule-notest,notest', '/home/hasinianu1217/twmn/ansible/collections/ansible_collections/twmn/twmn/roles/iptables/molecule/default/converge.yml']
---------------------------------------------------------------------------------------------------------------------------------
Can anyone clarify me, what is this error look like?
Thanks
Selvi