You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hetzner-ansible/roles/harbor/tasks/configure_robot_tokens.yml

30 lines
722 B
YAML

---
- name: "Initialze VARs"
set_fact:
tok_obj: {}
tags:
- harbor-configure-robots
- name: "DEBUG"
debug:
msg: "DEBUGGING - robot_token: {{ robot_token }}"
when:
- debug
- harbor-configure-robots
- name: "Drop token_state from dict to avoid rejecting object by harbor API due to unknown field"
set_fact:
tok_obj: "{{ tok_obj | combine( { item.key: item.value } ) }}"
when: item.key not in ['token_state']
with_dict: "{{ robot_token }}"
tags:
- harbor-configure-robots
- name:
include_tasks: configure_robot_tokens_crud.yml
vars:
token_state: "{{ robot_token.token_state | default('present') }}"
token_object: "{{ tok_obj }}"
tags:
- harbor-configure-robots