Ansible tower requires a valid license to run any job. Red Hat License management is much easier if you directly manage from the Red Hat subscription portal. But in some cases, you might receive the license from Red Hat sales execute to renew/extended the licenses. This article will cover both scenarios to extend expired licenses.
Note:
- If trail license expired: Ansible Tower instance is locked into read-only like state until a new valid license is provided. The instance is read-only immediately after the expiration
- If Non-trial license expiry – the Ansible Tower instance is functioning in limited fashion after the active license has expired for an additional 30 days.
Scenario#1
Assuming that your ansible tower instance is having internet connectivity and you have access to the Red Hat Subscription portal to manage the licenses.
1.Login to ansible tower with admin privileges.
2. Navigate to Settings – > License tab.
3. Enter the red-hat subscription portal username and password. Click on get licenses.
4. Select the newly procured licenses.
Scenario#2
Here is the second scenario where you might receive the license key files from Red Hat directly. On expired ansible tower instance, you can’t directly import the license key file using the web interface. You need to use an API URL (/api/v2/config) to post the newly received license keys.
1.Navigate to the Ansible Tower’s config API URL. (https://tower.example.com/api/v2/config/)
2. Paste the license key in content after adding “eula_accepted” : “true” . Click on POST to update the new license keys.
You could also the perform the same using any API tools. The following examples show how to update the licenses using curl & tower-cli
CURL:
#curl -k -H "Content-Type: application/json" -X POST -u admin:password -d '{"eula_accepted": "true","company_name": "UnixArena","contact_email": "lingxxxxxran.rxxxxxxxx@gmail.com","contact_name": "Lingeswaran R", "hostname": "xxxxxxxxxx", "instance_count": 50, "license_date": 299958dsds602, "license_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "license_type": "enterprise","subscription_name": "Red Hat Ansible(100 managed nodes)", "trial": false,}' https://tower.example.com/api/v2/config/
Tower-CLI
# tower-cli setting modify LICENSE '{"eula_accepted": "true","company_name": "UnixArena","contact_email": "lingxxxxxran.rxxxxxxxx@gmail.com","contact_name": "Lingeswaran R", "hostname": "xxxxxxxxxx", "instance_count": 100, "license_date": 2095872602, "license_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "license_type": "enterprise","subscription_name": "Red Hat Ansible(100 managed nodes)", "trial": true,}'
Leave a Reply