ingatesystems.fuego_modules.fuego_datetime – Manage date and time on an Ingate SBC.

Note

This plugin is part of the ingatesystems.fuego_modules collection (version 1.1.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install ingatesystems.fuego_modules.

To use it in a playbook, specify: ingatesystems.fuego_modules.fuego_datetime.

New in version 1.0.0: of ingatesystems.fuego_modules

Synopsis

  • Manage date and time on an Ingate SBC.

Requirements

The below requirements are needed on the host that executes this module.

  • ingatesdk >= 1.0.14

Parameters

Parameter

Comments

client

dictionary / required

A dict object containing connection details.

address

string / required

The hostname or IP address to the unit.

password

string / required

The password for the REST API user.

port

integer

Which HTTP(S) port to connect to.

scheme

string / required

Which HTTP protocol to use.

Choices:

  • http

  • https

timeout

integer

The timeout (in seconds) for REST API requests.

username

string / required

The username of the REST API user.

validate_certs

aliases: verify_ssl

boolean

Verify the unit’s HTTPS certificate.

Choices:

  • no

  • yes ← (default)

version

string

REST API version.

Choices:

  • v1 ← (default)

datetime

dictionary

A dict object containing time information. Use with set.

date

string

A date. E.g. 2018-07-19.

time

string

A time. E.g. 11:59:59.

zone

string

A timezone. E.g. Europe/Stockholm.

get

boolean

Get the current date, time and timezone.

Choices:

  • no

  • yes

set

boolean

Set the current date, time and timezone.

Choices:

  • no

  • yes

timezone_list

boolean

List all available timezones.

Choices:

  • no

  • yes

Notes

Note

  • This module requires that the Ingate Python SDK is installed on the host. To install the SDK use the pip command from your shell pip install ingatesdk.

Examples

# 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"

# name: Get date, time and timezone
- fuego_datetime:
    client: "{{ stored_client_data }}"
    get: true

# List all available timezones.
- fuego_datetime:
    client: "{{ stored_client_data }}"
    timezone_list: true

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

get

dictionary

Get current date, time and timezone

Returned: when get is yes and success

msg

string

Date, time and timezone information

Returned: success

Sample: “2018-07-25 14:25:09 Europe/Stockholm”

set

dictionary

Set current date, time and timezone

Returned: when set is yes and success

msg

string

Date, time and timezone information

Returned: success

Sample: “2018-07-25 14:24:09 Europe/Stockholm”

timezone_list

list / elements=dictionary

List of available timezones

Returned: when timezone_list is yes and success

data

dictionary

Zone information

Returned: success

zone

string

The name of the zone

Returned: success

Sample: “US/Michigan”

Authors

  • Ingate Systems AB (@ingatesystems)