fortinet.fortiflexvm.fortiflexvm_entitlements_update (2.2.0) — module

Update an existing entitlement.

| "added in version" 1.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 updates an existing entitlement.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update entitlement
  hosts: localhost
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Update an entitlement.
      fortinet.fortiflexvm.fortiflexvm_entitlements_update:
        username: "{{ username }}"
        password: "{{ password }}"
        serialNumber: "FGVMXXXX00000000"
        # Please specify configId if you want to update configId, description or endDate
        configId: 3196
        description: "Modify through Ansible" # Optional.
        endDate: "2024-12-12T00:00:00"        # Optional. If not set, it will use the program end date automatically.
        status: "ACTIVE"                      # Optional. ACTIVE or STOPPED
      register: result

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

Inputs

    
status:
    choices:
    - ACTIVE
    - STOPPED
    description:
    - The status of the entitlement.
    type: str

endDate:
    description:
    - The end date of the entitlement's validity.
    - Any format that satisfies [ISO 8601](https://www.w3.org/TR/NOTE-datetime-970915.html)
      is accepted.
    - Recommended format is "YYYY-MM-DDThh:mm:ss".
    type: str

configId:
    description:
    - The ID of the configuration.
    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

description:
    description:
    - The description of the entitlement.
    type: str

serialNumber:
    description:
    - The serial number of the entitlement to update.
    required: true
    type: str

Outputs

entitlements:
  contains:
    accountId:
      description: The ID of the account associated with the program.
      returned: always
      sample: 12345
      type: int
    configId:
      description: The config ID of the entitlement.
      returned: always
      sample: 3196
      type: int
    description:
      description: The description of the entitlement.
      returned: always
      sample: Modify through Ansible
      type: str
    endDate:
      description: The end date of the entitlement.
      returned: always
      sample: '2023-12-12T00:00:00'
      type: str
    serialNumber:
      description: The serial number of the entitlement.
      returned: always
      sample: FGVMMLTM23001324
      type: str
    startDate:
      description: The start date of the entitlement.
      returned: always
      sample: '2023-03-13T11:48:53.03'
      type: str
    status:
      description: The status of the VM. Possible values are "PENDING", "ACTIVE",
        "STOPPED" or "EXPIRED".
      returned: always
      sample: ACTIVE
      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: NOTUSED
      type: str
  description: The entitlement you update. This list only contains one entitlement.
  returned: always
  type: list