gcpubsub_facts - List Topics/Subscriptions and Messages from Google PubSub.

New in version 2.3.

Synopsis

Requirements (on host that executes module)

  • python >= 2.6
  • google-auth >= 0.5.0
  • google-cloud-pubsub >= 0.22.0

Options

parameter required default choices comments
state
no
list is the only valid option.
topic
no
GCP pubsub topic name. Only the name, not the full path, is required.
view
yes
Choices are 'topics' or 'subscriptions'

Examples

## List all Topics in a project
gcpubsub_facts:
  view: topics
  state: list

## List all Subscriptions in a project
gcpubsub_facts:
  view: subscriptions
  state: list

## List all Subscriptions for a Topic in a project
gcpubsub_facts:
  view: subscriptions
  topic: my-topic
  state: list

Return Values

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

name description returned type sample
subscriptions
List of subscriptions.
When view is set to subscriptions. list ['mysubscription', 'mysubscription2']
topic
Name of topic. Used to filter subscriptions.
Always str mytopic
topics
List of topics.
When view is set to topics. list ['mytopic', 'mytopic2']

Notes

Note

  • list state enables user to list topics or subscriptions in the project. See examples for details.

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/gcpubsub_facts_module.html