fortinet.fortiflexvm.fortiflexvm_entitlements_list_info (2.2.0) — module

Get entitlements information.

| "added in version" 2.0.0 of fortinet.fortiflexvm"

Authors: Xinwei Du (@dux-fortinet)

Install collection

Install with ansible-galaxy collection install fortinet.fortiflexvm:==2.2.0


Add to requirements.yml

  collections:
    - name: fortinet.fortiflexvm
      version: 2.2.0

Description

This module retrieves information of target entitlements.

Either configId or (accountId and programSerialNumber) should be provided.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get information of target entitlements.
  hosts: localhost
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Get entitlements list
      fortinet.fortiflexvm.fortiflexvm_entitlements_list_info:
        username: "{{ username }}"
        password: "{{ password }}"
        # Either configId or (accountId and programSerialNumber) should be provided.
        configId: 22
        # accountId: 12345
        # programSerialNumber: "ELAVMS00XXXXX"

        # Optional filter options
        # description: "you can use description to distinguish entitlements"
        # serialNumber: "XXXXXX0000000000"
        # status: "PENDING"
        # tokenStatus: "NOTUSED"
      register: result

    - name: Display response
      ansible.builtin.debug:
        var: result.entitlements

Inputs

    
status:
    description: Filter option. "ACTIVE", "STOPPED", "PENDDING" or "EXPIRED".
    type: str

configId:
    description:
    - The ID of the configuration for which to retrieve the list of VMs.
    type: int

password:
    description:
    - The password to authenticate. If not declared, the code will read the environment
      variable FORTIFLEX_ACCESS_PASSWORD.
    type: str

username:
    description:
    - The username to authenticate. If not declared, the code will read the environment
      variable FORTIFLEX_ACCESS_USERNAME.
    type: str

accountId:
    description: Filter option. Account ID.
    type: int

description:
    description: Filter option. Description.
    type: str

tokenStatus:
    description: Filter option. Token status. "NOTUSED" or "USED".
    type: str

serialNumber:
    description: Filter option. Serial number.
    type: str

programSerialNumber:
    description: Filter option. The serial number of your FortiFlex Program.
    type: str

Outputs

entitlements:
  contains:
    accountId:
      description: Account ID.
      returned: always
      sample: 12345
      type: int
    configId:
      description: The config ID of the entitlement.
      returned: always
      sample: 22
      type: int
    description:
      description: The description of the entitlement.
      returned: always
      sample: VM created for department X
      type: str
    endDate:
      description: The end date of the entitlement.
      returned: always
      sample: '2020-09-12 12:13:37'
      type: str
    serialNumber:
      description: The serial number of the entitlement.
      returned: always
      sample: FGVMELTM20000004
      type: str
    startDate:
      description: The start date of the entitlement.
      returned: always
      sample: '2020-08-25 10:12:25'
      type: str
    status:
      description: The status of the entitlement. Possible values are "PENDING", "ACTIVE",
        "STOPPED" or "EXPIRED".
      returned: always
      sample: STOPPED
      type: str
    token:
      description: The token of the entitlement.
      returned: always
      type: str
    tokenStatus:
      description: The token status of the entitlement. Possible values are "NOTUSED"
        or "USED".
      returned: always
      sample: USED
      type: str
  description: List of entitlements associated with the specified config ID.
  returned: always
  type: list