Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit bd64494b authored by Youssef BOUFNICHEL's avatar Youssef BOUFNICHEL
Browse files

:bug: fix list of unsued images in clean_docker_images role

parent 9cbcdf8f
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
- name: "Fetch unused Docker Image from Netbox "
ansible.builtin.set_fact:
unused_images_ids: |
unused_images_id: |
{{
[
lookup(
......@@ -15,7 +15,7 @@
api_filter='containers=null name=' + rps_images_prefix,
)
] | flatten
| community.general.json_query('[*].value.id')
| community.general.json_query('[].value.{id: id}')
| list
}}
......@@ -27,8 +27,7 @@
Authorization: "Token {{ netbox_token }}"
Content-Type: "application/json"
validate_certs: false
body:
ids: "{{ unused_images_ids }}"
body: "{{ unused_images_id }}"
body_format: json
return_content: true
status_code: 204
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment