Pubsub + DNS Facts (#75)

<!-- This change is generated by MagicModules. -->
/cc @rambleraptor
This commit is contained in:
The Magician 2018-09-21 10:57:51 -07:00 committed by Alex Stephen
commit 2a6c1e408e
29 changed files with 366 additions and 315 deletions

View file

@ -18,56 +18,50 @@
# ----------------------------------------------------------------------------
from __future__ import absolute_import, division, print_function
__metaclass__ = type
################################################################################
# Documentation
################################################################################
ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ["preview"], 'supported_by': 'community'}
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ["preview"],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: gcp_pubsub_topic_facts
description:
- Gather facts for GCP Topic
- Gather facts for GCP Topic
short_description: Gather facts for GCP Topic
version_added: 2.8
version_added: 2.7
author: Google Inc. (@googlecloudplatform)
requirements:
- python >= 2.6
- requests >= 2.18.4
- google-auth >= 1.3.0
options: {}
- python >= 2.6
- requests >= 2.18.4
- google-auth >= 1.3.0
extends_documentation_fragment: gcp
'''
EXAMPLES = '''
- name: " a topic facts"
- name: a topic facts
gcp_pubsub_topic_facts:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
'''
RETURN = '''
items:
description: List of items
returned: always
type: complex
contains:
name:
description:
- Name of the topic.
returned: success
type: str
labels:
description:
- A set of key/value label pairs to assign to this Topic.
returned: success
type: dict
description: List of items
returned: always
type: complex
contains:
name:
description:
- Name of the topic.
returned: success
type: str
'''
################################################################################
@ -82,9 +76,12 @@ import json
def main():
module = GcpModule(argument_spec=dict())
module = GcpModule(
argument_spec=dict(
)
)
if not module.params['scopes']:
if 'scopes' not in module.params:
module.params['scopes'] = ['https://www.googleapis.com/auth/pubsub']
items = fetch_list(module, collection(module))
@ -92,7 +89,9 @@ def main():
items = items.get('topics')
else:
items = []
return_value = {'items': items}
return_value = {
'items': items
}
module.exit_json(**return_value)