ansible.builtin.gcpubsub_info (v2.9.27) — module

List Topics/Subscriptions and Messages from Google PubSub.

| "added in version" 2.3 of ansible.builtin"

Authors: Tom Melendez (@supertom) <tom@supertom.com>

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

List Topics/Subscriptions from Google PubSub. Use the gcpubsub module for topic/subscription management. See U(https://cloud.google.com/pubsub/docs) for an overview.

This module was called C(gcpubsub_facts) before Ansible 2.9. The usage did not change.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
## List all Topics in a project
- gcpubsub_info:
    view: topics
    state: list
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
## List all Subscriptions in a project
- gcpubsub_info:
    view: subscriptions
    state: list
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
## List all Subscriptions for a Topic in a project
- gcpubsub_info:
    view: subscriptions
    topic: my-topic
    state: list

Inputs

    
view:
    description:
    - Choices are 'topics' or 'subscriptions'
    required: true

state:
    description:
    - list is the only valid option.
    required: false

topic:
    description:
    - GCP pubsub topic name.  Only the name, not the full path, is required.
    required: false

Outputs

subscriptions:
  description: List of subscriptions.
  returned: When view is set to subscriptions.
  sample:
  - mysubscription
  - mysubscription2
  type: list
topic:
  description: Name of topic. Used to filter subscriptions.
  returned: Always
  sample: mytopic
  type: str
topics:
  description: List of topics.
  returned: When view is set to topics.
  sample:
  - mytopic
  - mytopic2
  type: list