I'm working wit uri module with satellite.
I do one playbook for create a new host_collection and it works OK.
- name: CREATE HC
uri:
user: "{{user}}"
password: "{{password}}"
method: POST
return_content: yes
force_basic_auth: yes
validate_certs: no
body_format: json
body: '{"name":"{{hc}}","organization_id":"1"}'
status_code: [200,201,202]
But I want to do a playbook to add/remove host from a host collection, and the urls that appears in the api guides fails.
For api v1 the api guide indicates use PUT /katello/api/v2/host_collections/:id/add_systems
I did this playbooks and it fails:
- name: Assign sat server {{server}} to {{host_collection}}
uri:
user: "{{user}}"
password: "{{password}}"
method: PUT
return_content: yes
force_basic_auth: yes
validate_certs: no
body_format: json
body: '{"system_ids":"[972,1280]"}'
status_code: [200,201,202,204,301,401]
The message error is 404 error
The page you were looking for doesn't exist (404)
The page you were looking for doesn't exist