m1yag1.globus.globus_collection module – Manage Globus Collections
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_collection.
New in m1yag1.globus 1.0.0
Synopsis
Create, update, or delete Globus Collections
Configure collection access and permissions
Parameters
Parameter |
Comments |
|---|---|
Authentication method to use. If not specified, auto-detects based on available credentials. When Otherwise falls back to Choices:
|
|
Globus Auth client ID for client_credentials authentication. Can also be set via the |
|
Globus Auth client secret for client_credentials authentication. Can also be set via the |
|
Type of collection Choices:
|
|
Contact email for the collection |
|
Description of the collection |
|
ID of the endpoint hosting this collection |
|
Identity ID for guest collections |
|
Keywords for the collection |
|
Display name of the collection |
|
Organization name |
|
Path on the endpoint for this collection |
|
Whether the collection should be public Choices:
|
|
Desired state of the collection Choices:
|
|
User credential ID for guest collections |
Notes
Note
Authentication is required for all Globus API operations.
For
client_credentialsauth, register a confidential client at https://developers.globus.org.For
cliauth, runglobus loginfirst to cache tokens.The
climethod reads tokens from~/.globus/cli/storage.db.For
cliauth with multiple profiles, setGLOBUS_PROFILEenvironment variable.Set
GLOBUS_SDK_ENVIRONMENTtosandboxortestfor non-production environments.
See Also
See also
- Globus Auth Documentation
Official Globus authentication documentation
- Globus CLI
Command-line interface for Globus
Examples
# Basic mapped collection
- name: Create a mapped collection
globus_collection:
name: "Research Data Collection"
endpoint_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
collection_type: "mapped"
path: "/data/research/"
description: "Shared research data repository"
organization: "University Research Lab"
contact_email: "admin@university.edu"
public: true
keywords:
- "research"
- "data"
state: present
# Genomics data collection with comprehensive metadata
- name: Create genomics data collection
globus_collection:
name: "Genomics Data"
endpoint_id: "{{ gcs_endpoint.endpoint_id }}"
path: "/data/genomics"
collection_type: mapped
description: "Genomics research data repository for sequencing projects"
organization: "Biology Department"
contact_email: "genomics-admin@university.edu"
public: true
keywords:
- genomics
- research
- biology
- sequencing
- NGS
state: present
# Private collaboration collection
- name: Create private collaboration collection
globus_collection:
name: "Multi-Inst Collaboration Data"
endpoint_id: "{{ collab_endpoint_id }}"
path: "/shared/collab"
collection_type: mapped
description: "Private data sharing for multi-institutional collaboration"
organization: "Research Consortium"
contact_email: "consortium-admin@universities.org"
public: false
keywords:
- collaboration
- multi-institutional
- private
state: present
# Guest collection for user sharing
- name: Create guest collection for user
globus_collection:
name: "Personal Data Share - {{ user_name }}"
endpoint_id: "{{ personal_endpoint_id }}"
collection_type: "guest"
path: "/home/{{ user_name }}/shared/"
identity_id: "{{ user_name }}@university.edu"
description: "Personal data sharing collection for {{ user_name }}"
public: false
state: present
# Multiple collections for GCS deployment
- name: Create storage collections on GCS
globus_collection:
name: "{{ item.name }}"
endpoint_id: "{{ gcs_endpoint.endpoint_id }}"
path: "{{ item.path }}"
collection_type: mapped
description: "{{ item.description }}"
organization: "Research Computing"
public: "{{ item.public | default(false) }}"
keywords: "{{ item.keywords | default([]) }}"
state: present
loop:
- name: "Home Directories"
path: "/home"
description: "User home directories"
public: false
keywords: ["home", "users"]
- name: "Shared Research"
path: "/research/shared"
description: "Shared research data repository"
public: true
keywords: ["research", "shared", "public"]
- name: "Scratch Space"
path: "/scratch"
description: "High-performance scratch storage"
public: false
keywords: ["scratch", "temporary", "hpc"]
# Collection with service credentials
- name: Create collection with service credentials
globus_collection:
name: "Production Data Repository"
endpoint_id: "{{ production_endpoint_id }}"
path: "/data/production"
collection_type: mapped
description: "Production data repository with automated management"
organization: "Research Computing Services"
contact_email: "data-services@university.edu"
public: true
client_id: "{{ vault_globus_client_id }}"
client_secret: "{{ vault_globus_client_secret }}"
keywords:
- production
- automated
- research-data
state: present
# Delete a collection
- name: Delete a collection
globus_collection:
name: "Old Collection"
endpoint_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
path: "/old/path/"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether the collection was changed Returned: always |
|
ID of the created/managed collection Returned: when state=present |
|
Name of the collection Returned: always |