I want to create some resources in an OpenSHift cluster using Ansible. Creation of resources works well, but when I run the same script for the second time, it claims that the resources already exist. In my opinion, this should not happen as ansible should be idempotent. I searched and found that this problem should be fixed (https://github.com/CiscoCloud/kubernetes-ansible/issues/69). What am I doing wrong?
Error message:
TASK [apply_templates : Set state of project-request in project developtest to present] *************************************************************************************************************************** fatal: [localhost]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "error": 409, "msg": "Failed to create object: {\"kind\":\"Status\",\"apiVersion\":\"v1\", \"metadata\":{},\"status\":\"Failure\",\"message\":\"project.project.openshift.io \\"developtest\\" already exists\",\"reason\":\"AlreadyExists\",\"details\":{\"name\":\"developtest\",\"group\":\"project.opens hift.io\",\"kind\":\"project\"},\"code\":409}\n", "reason": "Conflict", "status": 409}
Part of my playbook:
---
Maybe you can give me a hint where to look at. Thanks in advance.