mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Adding headers to be returned for retrieved messages. (#47375)
This commit is contained in:
parent
eb7f6a5e62
commit
5ba4e4411b
1 changed files with 5 additions and 1 deletions
|
@ -88,6 +88,9 @@ RETURN = """
|
||||||
routing_key:
|
routing_key:
|
||||||
description: The routing_key on the message in the queue.
|
description: The routing_key on the message in the queue.
|
||||||
type: str
|
type: str
|
||||||
|
headers:
|
||||||
|
description: The headers for the message returned from the queue.
|
||||||
|
type: dict
|
||||||
json:
|
json:
|
||||||
description: If application/json is specified in content_type, json will be loaded into variables.
|
description: If application/json is specified in content_type, json will be loaded into variables.
|
||||||
type: dict
|
type: dict
|
||||||
|
@ -161,7 +164,8 @@ class LookupModule(LookupBase):
|
||||||
'redelivered': method_frame.redelivered,
|
'redelivered': method_frame.redelivered,
|
||||||
'exchange': method_frame.exchange,
|
'exchange': method_frame.exchange,
|
||||||
'delivery_mode': properties.delivery_mode,
|
'delivery_mode': properties.delivery_mode,
|
||||||
'content_type': properties.content_type
|
'content_type': properties.content_type,
|
||||||
|
'headers': properties.headers
|
||||||
})
|
})
|
||||||
if properties.content_type == 'application/json':
|
if properties.content_type == 'application/json':
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue