Forum Discussion
Automate F5OS license activation using ansible
Hello,
working to automate the process of licensing the F5OS platform (r-series) using ansible but with the version we have in our production we cannot use F5OS ansible galaxy modules so we are using ansible uri module to get dossier from F5OS r-series system by API.
any-leads on how to achieve this license activation which requires dossier signing from "https://activate.f5.com/license/dossier.jsp" or if anyone can lead me to how the payload to this site should look like ?
Thank you for your replies. I was able to achieve this using ansible shell module. below task gets the activated dossier from "https://activate.f5.com/license/license.do" via proxy "http://proxyurl.com:80" and saves to local path.
- name: set license file path fact
set_fact:
license_file: "/localpath/{{ inventory_hostname }}_license.txt"- name: Activate License from F5 and extract license block
shell: |
curl -x http://proxyurl.com:80 -X POST \
-F "dossier={{ dossier }}" -F "submit=Next" -s -k \
https://activate.f5.com/license/license.do | \
sed -n '/<textarea[^>]*name="license"[^>]*>/,/<\/textarea>/p' | \
sed '1d;$d' | \
sed 's/"/"/g' > {{ license_file }}
register: f5os_license
delegate_to: localhost
4 Replies
Hi
the solution is more complicated than it seems. With ansible is not possible(for the version). Maybe with python/request and after play with some playbook of Ansible
- Melissa_C
Moderator
Hello kumar10,
We have a community member who was working on Automating F5 Licensing - without direct internet access that is technically for BIG-IP VE, however, I would suggest taking a look at it to see if it would help you in any way. If it doesn't help or leaves gaps, you would comment under that article to see if they have worked with automating for the F5OS r-series.
Also, if you have any update on your path to automating the license for your F5OS please add them to your post for you and future user to reference.
-Melissa
- kumar10
Nimbostratus
Thank you for your replies. I was able to achieve this using ansible shell module. below task gets the activated dossier from "https://activate.f5.com/license/license.do" via proxy "http://proxyurl.com:80" and saves to local path.
- name: set license file path fact
set_fact:
license_file: "/localpath/{{ inventory_hostname }}_license.txt"- name: Activate License from F5 and extract license block
shell: |
curl -x http://proxyurl.com:80 -X POST \
-F "dossier={{ dossier }}" -F "submit=Next" -s -k \
https://activate.f5.com/license/license.do | \
sed -n '/<textarea[^>]*name="license"[^>]*>/,/<\/textarea>/p' | \
sed '1d;$d' | \
sed 's/"/"/g' > {{ license_file }}
register: f5os_license
delegate_to: localhostMarking as solution - thanks for sharing!
If you disagree feel free to unMark.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com