Ansible redhat.satellite.host module is not idempotent while creating a VM in vSphere with 2 NICs.
Issue
Trying to execute an ansible playbook which provisions hosts with 2 NICs, and running the script the second time it's failing with error
failed: [localhost] (item=example.com) => {"ansible_loop_var": "item", "changed": false, "error": {"errors": {"ip": ["can't be blank"], "ip6": ["can't be blank"], "primary": ["interface is already set on the host"], "provision": ["interface is already set on the host"]}, "full_messages": ["Primary interface is already set on the host", "Provision interface is already set on the host", "IP address can't be blank", "Ip6 can't be blank"], "id": null}, "item": "example.com", "msg": "Error while performing create on interfaces: 422 Client Error: Unprocessable Entity for url: https://example.com/api/hosts/933/interfaces"}
Environment
- Ansible 2.9.27
- Redhat Satellite 6.13
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.