Last active
April 24, 2017 12:59
-
-
Save jas02/70dd74965ed47bc54e9fcfa1ce5aa471 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for slmid, data in pillar.get('rancher-environment', {}).items() %} | |
{% set api_account_name = data['api_account_name'] %} | |
{% set rancher_server = data['host'] %} | |
add_api_key: | |
cmd.run: | |
- name: | | |
curl -s \ | |
-X POST \ | |
-k \ | |
-H 'Accept: application/json' \ | |
-H 'Content-Type: application/json' \ | |
-d '{"type":"apikey","accountId":"1a1","name":"{{ api_account_name }}","description":null,"created":null,"kind":null,"removeTime":null,"removed":null,"uuid":null}' \ | |
'https://{{ rancher_server }}/v1/apikey' | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment