codeaffen / phpipam-ansible-modules

Ansible Modules to manage phpIPAM installations
https://codeaffen.org/projects/phpipam-ansible-modules
GNU General Public License v3.0
22 stars 10 forks source link

`hostname` parameter missing in task for address test case #77

Closed mvernimmen closed 2 years ago

mvernimmen commented 2 years ago

Describe the bug in tests/test_playbooks/tasks/address.yml there is no line to specify to set the hostname

To Reproduce use the test_playbook to create an ip record and set the hostname notice in phpipam that the record is created, but the hostname not created

Expected behavior expected hostname field to be set also

Versions:

Additional context the missing line is hostname: "{{ address.hostname }}" after adding this line, the hostname gets set correctly.

cmeissner commented 2 years ago

Hi @mvernimmen,

Thank you to bringing this to our attention. I get you mean that add hostname: "{{ address.hostname | default(omit) }}" in the following file would be enough?

https://github.com/codeaffen/phpipam-ansible-modules/blob/016dcb0060eb9aa3488b3a29adbc1e2a607b10fc/tests/test_playbooks/tasks/address.yml#L12-L13

As we currently not directly test this feature, as many others of that this is a nice to have fix not a bug. But you are right that the tests can be a bit more extensive and I will happy for every helping hand. As I currently work on this project completely alone it would be great to have some contributors.