drmofu.fortiflexvm.fortiflexvm_vms_points_info (1.0.1) — module

Get point usage for VMs.

| "added in version" 1.0.0 of drmofu.fortiflexvm"

Authors: Xinwei Du (@DrMofu)

Install collection

Install with ansible-galaxy collection install drmofu.fortiflexvm:==1.0.1


Add to requirements.yml

  collections:
    - name: drmofu.fortiflexvm
      version: 1.0.1

Description

Returns total points consumed by one or more virtual machines in a date range.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get point usage for VMs
  hosts: localhost
  collections:
    - drmofu.fortiflexvm
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Get VMs points
      drmofu.fortiflexvm.fortiflexvm_vms_points_info:
        username: "{{ username }}"
        password: "{{ password }}"
        configId: 25
        startDate: "2020-10-01"
        endDate: "2020-10-25"
      register: result

    - name: Display response
      debug:
        var: result.vms

Inputs

    
endDate:
    description:
    - The end date of the date range to query. Any format that satisfies [ISO 8601](https://www.w3.org/TR/NOTE-datetime-970915.html)
      is accepted.
    - Recommended format is YYYY-MM-DD.
    required: true
    type: str

configId:
    description:
    - The ID of the virtual machine configuration.
    required: true
    type: int

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

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

startDate:
    description:
    - The start date of the date range to query. Any format that satisfies [ISO 8601](https://www.w3.org/TR/NOTE-datetime-970915.html)
      is accepted.
    - Recommended format is YYYY-MM-DD.
    required: true
    type: str

Outputs

vms:
  contains:
    points:
      description: The total points consumed by the virtual machine in the specified
        date range.
      returned: always
      sample: 425
      type: int
    serialNumber:
      description: The serial number of the virtual machine.
      returned: always
      sample: FGVMELTM20000029
      type: str
  description: List of virtual machines and their consumed points in the specified
    date range.
  returned: always
  type: list