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
Can you please provide content of /twmn/ansible/collections/ansible_collections/twmn/twmn/roles/iptables/tasks/rules.yml ? The error suggests that you have not defined interfaces variable which is required. It is difficult to answer your question without looking at the role.
Thanks for your reply. Now, I have resolved those issues. But I am still looking for information about how to write test cases in molecule to test the tables alias port and masquerade rules. Molecule converge is working fine, is it possible to do verify those scenarios in Test infra.