Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grab ACCESS_TOKEN from envvar #9

Merged
merged 6 commits into from
Jul 5, 2024
Merged

Conversation

sebastian-luna-valero
Copy link
Contributor

Hi,

Currently this role only contextualizes the VM correctly when used via IM (see dependency with IM_INFRASTRUCTURE_AUTH):

- name: Execute contextualise_ssh_server command
command: contextualise_ssh_server {{IM_INFRASTRUCTURE_AUTH}}
args:
chdir: /opt/motley_cue
creates: /opt/motley_cue/motley_cue.conf
when: IM_INFRASTRUCTURE_AUTH is defined and IM_INFRASTRUCTURE_AUTH is not search(":")
register: contextualise_ssh_server
environment: "{{command_env}}"

However, it would also be interesting to use this role out of IM, for example running it with:

ansible-playbook --extra-vars ACCESS_TOKEN=$(oidc-token <account>) playbook.yaml

This PR adds the changes to make it happen.

Please have a look and let me know your thoughts.

Best regards,
Sebastian

@micafer micafer merged commit 826af37 into grycap:main Jul 5, 2024
3 checks passed
@sebastian-luna-valero sebastian-luna-valero deleted the updates branch July 5, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants