Deprecated

Removed in 3.0.0

i

Reason:The module does not return Ansible facts | Alternative:Use C(gcpubsub_info) from the C(google.cloud) collection instead

community.general.gcpubsub_facts (0.2.1) — module

List Topics/Subscriptions and Messages from Google PubSub.

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

Install collection

Install with ansible-galaxy collection install community.general:==0.2.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.2.1

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.
- name: List all Topics in a project
  gcpubsub_info:
    view: topics
    state: list
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List all Subscriptions in a project
  gcpubsub_info:
    view: subscriptions
    state: list
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: 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