I’d like to set some attributes when creating a folder with Ansible. This works as expected on the first run:
- name: create single folder
folder:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
path: /compute/testme
name: testme
attributes:
contactgroups:
groups:
- "testme-admin"
recurse_perms: true
state: present
delegate_to: localhost
but throws an error on subsequent runs:
fatal: [testps -> localhost]: FAILED! => {"changed": false, "msg": "Error calling API. HTTP code 400. Details: b'{\"title\": \"Bad Request\", \"status\": 400, \"detail\": \"These fields have problems: name\", \"fields\": {\"name\": [\"Unknown field.\"]}}', "}
Without the attributes part, the task is idempotent. Any idea what’s wrong?