30 lines
1.3 KiB
YAML

---
- name: Check if deployment method is supported
ansible.builtin.fail:
msg: >-2
Deployment method '{{ oidc_user_deployment_method }}' is not supported!
Supported are: {{ oidc_user_deployment_methods | join(', ') }}
when: oidc_user_deployment_method not in oidc_user_deployment_methods
- name: Configure OIDC provider
ansible.builtin.command:
cmd: "{{ oidc_user_occ_user_oidc_provider_set_command }}"
become_user: "{{ oidc_user_deployment_become_user }}"
become: "{{ oidc_user_deployment_become_user | default(false, true) }}"
when: oidc_user_deployment_method == 'host'
- name: Configure OIDC provider (docker)
community.docker.docker_container_exec:
container: "{{ oidc_user_deployment_method_docker_container_name }}"
command: "{{ oidc_user_occ_user_oidc_provider_set_command }}"
user: "{{ oidc_user_deployment_become_user | default(omit, true) }}"
when: oidc_user_deployment_method == 'docker'
- name: Configure OIDC provider (podman)
containers.podman.podman_container_exec:
name: "{{ oidc_user_deployment_method_podman_container_name }}"
command: "{{ oidc_user_occ_user_oidc_provider_set_command }}"
user: "{{ oidc_user_deployment_become_user | default(omit, true) }}"
when: oidc_user_deployment_method == 'podman'