mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 02:41:25 -07:00
* Added handling for commas in the agent field for agent configuration
* Removed test statement
* Added changelog fragment
* Fixed spelling on fragment :-)
(cherry picked from commit 123b5a9a3c
)
Co-authored-by: Jeffrey van Pelt <jeff@vanpelt.one>
This commit is contained in:
parent
4c13f10a05
commit
841286444e
3 changed files with 7 additions and 2 deletions
|
@ -281,7 +281,9 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||
parsed_value = [tag.strip() for tag in value.split(",")]
|
||||
self.inventory.set_variable(name, parsed_key, parsed_value)
|
||||
|
||||
if config == 'agent' and int(value):
|
||||
# The first field in the agent string tells you whether the agent is enabled
|
||||
# the rest of the comma separated string is extra config for the agent
|
||||
if config == 'agent' and int(value.split(',')[0]):
|
||||
agent_iface_key = self.to_safe('%s%s' % (key, "_interfaces"))
|
||||
agent_iface_value = self._get_agent_network_interfaces(node, vmid, vmtype)
|
||||
if agent_iface_value:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue