Last active
August 8, 2021 06:01
-
-
Save tuxfight3r/2f5080ae2f8e3d5ba3e557a339b6d7a1 to your computer and use it in GitHub Desktop.
Update Ansible Tower licence via REST api
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
##GET TOKEN | |
#Query to retrieve token | |
curl -X POST -k -v \ | |
-H 'Content-Type: application/json' \ | |
--data @/tmp/cred.json \ | |
https://tower.super.io/api/v1/authtoken/ | |
#cat /tmp/cred.json | |
{ "username": "admin", | |
"password": "secretpass" } | |
## UPDATE LICENCE WITH TOKEN | |
curl -X POST -k -v \ | |
-H 'Content-Type: application/json' \ | |
-H 'Authorization: Token a8dfdfdfdfdfdfdfd14ab1257f59b40d54294' \ | |
--data @/tmp/ansible.lic \ | |
https://tower.super.io/api/v1/authtoken/ | |
#cat /tmp/ansible.lic | |
{ | |
"company_name": "Super Limited", | |
"contact_email": "[email protected]", | |
"contact_name": "super user", | |
"hostname": "1212121217ff3a2eccf3cb8f", | |
"instance_count": 1000, | |
"license_date": 1504099406, | |
"license_key": "dwefwuwewfhwifehwiohfewiwefi1323r2r32fddfdfdfdd", | |
"license_type": "enterprise", | |
"subscription_name": "Ansible Tower by Red Hat, Standard (1000 Managed Nodes)", | |
"eula_accepted": "True" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment