ingatesystems.fuego_modules.fuego_datetime (1.1.0) — module

Manage date and time on an Ingate SBC.

| "added in version" 1.0.0 of ingatesystems.fuego_modules"

Authors: Ingate Systems AB (@ingatesystems)

Install collection

Install with ansible-galaxy collection install ingatesystems.fuego_modules:==1.1.0


Add to requirements.yml

  collections:
    - name: ingatesystems.fuego_modules
      version: 1.1.0

Description

Manage date and time on an Ingate SBC.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set date, time and timezone
- fuego_datetime:
    client: "{{ stored_client_data }}"
    set: true
    datetime:
      zone: "Europe/Stockholm"
      time: "18:00:00"
      date: "2019-02-12"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# name: Get date, time and timezone
- fuego_datetime:
    client: "{{ stored_client_data }}"
    get: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# List all available timezones.
- fuego_datetime:
    client: "{{ stored_client_data }}"
    timezone_list: true

Inputs

    
get:
    description:
    - Get the current date, time and timezone.
    type: bool

set:
    description:
    - Set the current date, time and timezone.
    type: bool

client:
    description:
    - A dict object containing connection details.
    required: true
    suboptions:
      address:
        description:
        - The hostname or IP address to the unit.
        required: true
        type: str
      password:
        description:
        - The password for the REST API user.
        required: true
        type: str
      port:
        description:
        - Which HTTP(S) port to connect to.
        type: int
      scheme:
        choices:
        - http
        - https
        description:
        - Which HTTP protocol to use.
        required: true
        type: str
      timeout:
        description:
        - The timeout (in seconds) for REST API requests.
        type: int
      username:
        description:
        - The username of the REST API user.
        required: true
        type: str
      validate_certs:
        aliases:
        - verify_ssl
        default: true
        description:
        - Verify the unit's HTTPS certificate.
        type: bool
      version:
        choices:
        - v1
        default: v1
        description:
        - REST API version.
        type: str
    type: dict

datetime:
    description:
    - A dict object containing time information. Use with C(set).
    suboptions:
      date:
        description:
        - A date. E.g. 2018-07-19.
        type: str
      time:
        description:
        - A time. E.g. 11:59:59.
        type: str
      zone:
        description:
        - A timezone. E.g. Europe/Stockholm.
        type: str
    type: dict

timezone_list:
    description:
    - List all available timezones.
    type: bool

Outputs

get:
  contains:
    msg:
      description: Date, time and timezone information
      returned: success
      sample: 2018-07-25 14:25:09 Europe/Stockholm
      type: str
  description: Get current date, time and timezone
  returned: when C(get) is yes and success
  type: dict
set:
  contains:
    msg:
      description: Date, time and timezone information
      returned: success
      sample: 2018-07-25 14:24:09 Europe/Stockholm
      type: str
  description: Set current date, time and timezone
  returned: when C(set) is yes and success
  type: dict
timezone_list:
  contains:
    data:
      contains:
        zone:
          description: The name of the zone
          returned: success
          sample: US/Michigan
          type: str
      description: Zone information
      returned: success
      type: dict
  description: List of available timezones
  elements: dict
  returned: when C(timezone_list) is yes and success
  type: list