Skip to content

Instantly share code, notes, and snippets.

@goneri
Last active September 23, 2021 17:03
Show Gist options
  • Save goneri/92433ccf05d1e02773d47e7c1b5bc681 to your computer and use it in GitHub Desktop.
Save goneri/92433ccf05d1e02773d47e7c1b5bc681 to your computer and use it in GitHub Desktop.
azure-session.sh
#!/bin/bash
job_id=$(uuidgen)
ansible_core_ci=$(cat ~/.ansible-core-ci.key)
curl -X PUT -H "Content-Type: application/json" --data '{"config": {"platform": "azure"}, "auth": {"remote": {"key": "'${ansible_core_ci}'", "nonce": null}}, "threshold": 1}' https://ansible-core-ci.testing.ansible.com/dev/azure/${job_id}| python -c 'import yaml, sys; print(yaml.dump(yaml.safe_load(sys.stdin), default_flow_style=False))' |tee session.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment