Hello,
I'm currently working on configuring my ignition 8.3.002 gateway using the API.
It's generally working well, but I'm having an issue creating an internal user source.
When I do the request, it does return success and I see the user source inside the gateway. But I'm not able to create any users for this user source afterwards, either manually or through the API. User creation requests do work on manually created user source.
The error I get is User Source "" not found, no matter which name I use for the user source.
This is the json payload "user_source_internal_config" I'm using for the user source creation:
{
"collection": "core",
"enabled": true,
"description": "",
"type": "ignition/user-source",
"config": {
"profile": {
"type": "INTERNAL",
"scheduleRestricted": false,
"failoverProfile": "",
"failoverMode": "SOFT",
"cacheValidationTimeout": 15,
"lockoutEnabled": true,
"lockoutAttempts": 3,
"lockoutWindow": 10
},
"settings": {
"passwordComplexity": 4,
"passwordContainsPassword": true,
"passwordContainsUserName": true,
"passwordHistory": 0,
"passwordMaxAge": 0,
"passwordMaxRepeatedChars": 3,
"passwordMinLength": 8
}
}
}
And this is the playbook task I'm using where I inject the name:
name: Create InternalEmergency user source
ansible.builtin.uri:
url: "{{ ignition_gateway_url }}/data/api/v1/resources/ignition/user-source"
method: POST
headers:
Accept: "application/json"
Content-Type: "application/json"
X-Ignition-API-Token: "{{ api_token }}"
body: >-
{{ [user_source_internal_config | combine({
'name': 'Example Name'
})] | to_json }}
body_format: json
return_content: true
Accept status code 409 which indicates the resource already exists
status_code:
- 200
- 409
validate_certs: false
register: user_source_internal_create_response