m1yag1.globus.globus_timer module – Manage Globus Timers

Note

This module is part of the m1yag1.globus collection (version 0.6.0).

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 m1yag1.globus.

To use it in a playbook, specify: m1yag1.globus.globus_timer.

New in m1yag1.globus 1.0.0

Synopsis

  • Create, update, or delete Globus Timers

  • Schedule automated transfers and workflows

  • Supports both one-time and recurring timers

Parameters

Parameter

Comments

auth_method

string

Authentication method to use.

If not specified, auto-detects based on available credentials.

When client_id and client_secret are provided, uses client_credentials.

Otherwise falls back to cli (reads tokens from globus-cli storage).

Choices:

  • "client_credentials"

  • "cli"

callback_body

dictionary

JSON body to send to callback URL

callback_url

string

URL to call when timer fires

client_id

string

Globus Auth client ID for client_credentials authentication.

Can also be set via the GLOBUS_CLIENT_ID environment variable.

client_secret

string

Globus Auth client secret for client_credentials authentication.

Can also be set via the GLOBUS_CLIENT_SECRET environment variable.

name

string / required

Name/label for the timer

schedule

dictionary

Schedule specification for the timer

datetime

string

ISO 8601 datetime for one-time execution

interval_days

integer

Interval in days for recurring timers

interval_hours

integer

Interval in hours for recurring timers

interval_minutes

integer

Interval in minutes for recurring timers

interval_seconds

integer

Interval in seconds for recurring timers

type

string

Type of schedule (once, recurring)

Choices:

  • "once" ← (default)

  • "recurring"

scope

string

Scope required for timer operation

start

string

Start datetime (ISO 8601) for recurring timers

state

string

Desired state of the timer

Choices:

  • "present" ← (default)

  • "absent"

  • "active"

  • "inactive"

stop_after

string

Stop datetime (ISO 8601) for recurring timers

stop_after_n

integer

Number of executions before stopping

timer_id

string

ID of existing timer (for updates/deletion)

Notes

Note

  • Authentication is required for all Globus API operations.

  • For client_credentials auth, register a confidential client at https://developers.globus.org.

  • For cli auth, run globus login first to cache tokens.

  • The cli method reads tokens from ~/.globus/cli/storage.db.

  • For cli auth with multiple profiles, set GLOBUS_PROFILE environment variable.

  • Set GLOBUS_SDK_ENVIRONMENT to sandbox or test for non-production environments.

See Also

See also

Globus Auth Documentation

Official Globus authentication documentation

Globus CLI

Command-line interface for Globus

Examples

- name: Create one-time timer
  globus_timer:
    name: "One-time data transfer"
    schedule:
      type: once
      datetime: "2025-12-31T23:59:59Z"
    callback_url: "https://transfer.api.globus.org/v0.10/transfer"
    callback_body:
      source_endpoint: "{{ source_ep }}"
      destination_endpoint: "{{ dest_ep }}"
      DATA:
        - source_path: "/data/"
          destination_path: "/backup/"
          recursive: true
    state: present

- name: Create recurring timer (every 24 hours)
  globus_timer:
    name: "Daily backup"
    schedule:
      type: recurring
      interval_hours: 24
    start: "2025-01-01T00:00:00Z"
    callback_url: "https://transfer.api.globus.org/v0.10/transfer"
    callback_body:
      source_endpoint: "{{ source_ep }}"
      destination_endpoint: "{{ dest_ep }}"
      DATA:
        - source_path: "/data/"
          destination_path: "/backup/"
          recursive: true
    state: present

- name: Create timer with stop conditions
  globus_timer:
    name: "Weekly sync (10 times)"
    schedule:
      type: recurring
      interval_days: 7
    start: "2025-01-01T00:00:00Z"
    stop_after_n: 10
    callback_url: "https://transfer.api.globus.org/v0.10/transfer"
    callback_body:
      source_endpoint: "{{ source_ep }}"
      destination_endpoint: "{{ dest_ep }}"
      DATA:
        - source_path: "/data/"
          destination_path: "/sync/"
          recursive: true
    state: present

- name: Pause a timer
  globus_timer:
    name: "Daily backup"
    state: inactive

- name: Resume a timer
  globus_timer:
    name: "Daily backup"
    state: active

- name: Delete a timer
  globus_timer:
    name: "Old timer"
    state: absent

Return Values

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

Key

Description

changed

boolean

Whether the timer was changed

Returned: always

name

string

Name of the timer

Returned: always

schedule

dictionary

Timer schedule information

Returned: when state=present

status

string

Current status of the timer (active/inactive)

Returned: when state=present

timer_id

string

ID of the created/managed timer

Returned: when state=present

Authors

  • m1yag1