f5-ansible
f5-ansible copied to clipboard
Add Unreachable Device type to the bigiq_regkey_license_assignment
ISSUE TYPE
- Feature Idea
COMPONENT NAME
bigiq_regkey_license_assignment
ANSIBLE VERSION
ansible 2.9.13
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/testuser/.ansible/plugins/modules', u '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.17 (default, Sep 30 2020, 13:38:04) [GCC 7.5.0]
PYTHON VERSION
Python 2.7.17
BIGIP VERSION
Sys::Version
Main Package
Product BIG-IP
Version 13.1.3.4
Build 0.0.5
Edition Point Release 4
Date Tue Jun 16 14:26:18 PDT 2020
CONFIGURATION
OS / ENVIRONMENT
N/A
SUMMARY
The module allows for issuing licenses to managed and unmanaged devices but need to also be able to generate license files for unreachable devices. Currently have to use iControl REST calls to accomplish.
STEPS TO REPRODUCE
- name: Request Unmanaged Device License
uri:
url: "https://{{ BIGIQ_IP }}:{{ bigiq_port }}/mgmt/cm/device/tasks/licensing/pool/member-management"
method: POST
body: |
{
"licensePoolName": "{{ BIGIQLicPool }}",
"command": "assign",
"address": "{{ BIGIP_IP }}",
"user": "admin",
"password": "admin",
"assignmentType": "UNMANAGED",
"skuKeyword1": "{{ LicSKU }}",
"unitOfMeasure": "{{ ReportUnit }}",
"tenant": "{{ LicTenant }}"
}
body_format: json
headers:
X-F5-Auth-Token: "{{ auth['json']['token']['token'] }}"
status_code: 202
validate_certs: "{{ validate_certs }}"
register: licenseRequest_Current
- name: Set the Job Status to status from request
set_fact:
jobStatus: "{{ licenseRequest_Current.json.status }}"
- name: Poll for License Job completion
uri:
url: "https://{{ BIGIQ_IP }}:{{ bigiq_port }}/mgmt/cm/device/tasks/licensing/pool/member-management/{{ licenseRequest_Current.json.id }}"
method: GET
headers:
X-F5-Auth-Token: "{{ auth['json']['token']['token'] }}"
status_code: 200
validate_certs: "{{ validate_certs }}"
register: licenseRequest_Status
until: "licenseRequest_Status.json.status != 'STARTED'"
retries: 10
delay: 10
- name: Check for license failure
fail:
msg: "{{ licenseRequest_Status.json.errorMessage }}"
when: "licenseRequest_Status.json.status == 'FAILED'"
any_errors_fatal: true
when: "not(License_State.json.entries is defined)"
EXPECTED RESULTS
ACTUAL RESULTS
Tracking via FMFA-666
Hi, we are closing this request now. Please re-open if required or send an email to [email protected]. Thanks!