--- - name: keycloak-providers | Get the keycloak providers tags: - keycloak - keycloak_providers - keycloak_providers_jar block: - name: keycloak-providers | Getting maven artifact providers community.general.maven_artifact: artifact_id: "{{ item.maven_id }}" version: "{{ item.maven_version | default('latest') }}" group_id: "{{ item.maven_group_id }}" extension: "{{ item.maven_extension | default('jar') }}" repository_url: "{{ item.maven_repo_url }}" dest: "{{ keycloak_providers_directory }}/{{ item.name }}.{{ item.maven_extension | default('jar') }}" verify_checksum: always mode: "0644" loop: '{{ keycloak_remote_providers }}' when: item.maven_extension is not defined or item.maven_extension != "ear" notify: Restart Keycloak - name: keycloak-providers | Getting providers from URL ansible.builtin.get_url: url: "{{ item.url }}" dest: "{{ keycloak_providers_directory }}/{{ item.dest_file | default('') }}" force: "{{ item.force | default( omit ) }}" checksum: "{{ item.checksum | default( omit ) }}" validate_certs: "{{ item.validate_certs | default( omit ) }}" force_basic_auth: "{{ item.force_basic_auth | default( omit ) }}" url_username: "{{ item.username | default( omit ) }}" url_password: "{{ item.password | default( omit ) }}" mode: "0644" loop: '{{ keycloak_remote_providers_url }}' notify: Restart Keycloak