Skip to content

Commit

Permalink
Merge pull request #341 from SkynetLabs/fil/sky-1327-fix-jwks.json-ge…
Browse files Browse the repository at this point in the history
…neration

Fil/sky 1327 fix jwks.json generation
  • Loading branch information
MSevey authored Jul 22, 2022
2 parents acd2d26 + 251a2db commit 162acab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 6 additions & 11 deletions playbooks/tasks/portal-accounts-generate-jwks.json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@

- name: "Generate jwks.json using {{ oathkeeper_docker_image }} image"
local_action:
module: community.docker.docker_container
name: jwks-config-generator
image: "{{ oathkeeper_docker_image }}"
volumes:
# We call another docker container from our container (docker in
# docker) so we need to pass docker socket
- /var/run/docker.sock:/var/run/docker.sock
command: "credentials generate --alg RS256"
container_default_behavior: no_defaults
detach: False
# We use ansible.builtin.command instead of community.docker
# .docker_container because docker_container doesn't generates jwks.json
# correctly, it outputs 7 json strings instead of 1.
module: ansible.builtin.command
cmd: "docker run --rm {{ oathkeeper_docker_image }} credentials generate --alg RS256"
register: jwks_generation_result

- name: Remove oathkeeper container
Expand All @@ -27,4 +22,4 @@

- name: Read generated jwks.json
set_fact:
accounts_jwks_data: "{{ jwks_generation_result.container.Output }}"
accounts_jwks_data: "{{ jwks_generation_result.stdout }}"
2 changes: 1 addition & 1 deletion scripts/lib/ansible-executor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pushd $ans_dir > /dev/null

# Configs
# Current Ansible Control Machine image
ansiblecm_image='skynetlabs/ansiblecm:ansible-3.1.0-skynetlabs-0.7.0'
ansiblecm_image='skynetlabs/ansiblecm:ansible-3.1.0-skynetlabs-0.7.3'

# To allow running 2 or more parallel ansiblecm containers running from
# different directories (having mounted different directories) we need to
Expand Down

0 comments on commit 162acab

Please sign in to comment.