Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Output (type: List <KeyValuePair <String,String>>): outputs a list of KeyValuePair of group→host for each host added to the inventory.


Inventory Read

This activity reads an inventory of groups and hosts, if existent.

Activity Parameters

The Inventory Read activity parameters can be provided by manual inserted values or via IN arguments or variables:

Image Added


Parameters:

  • Connection (text box editor type) (type: object): the Ansible Connection object. The output parameter from Connect To Ansible activity should be used as Input here.
  • Group (text box editor type) (type: string): enter group name. E.g. Flowster. This parameter takes precedence over Hosts parameter. If both parameters are empty, the result will contain all groups with all hosts existent on the inventory.
  • Hosts (text box editor type) (type: String[]): enter hosts array of strings .E.g. New String() {"hostname1", "hostname2"}

The Read Only Output variable are the possible output values that the activity will provide:

  • Output (type: List <KeyValuePair <String,String>>): Outputs a list of KeyValuePairs with key : group name and value: host;info . E.g. value returned for host1 will be stored as host1;ansible_ssh_hostroot@10.10.10.1


In order to iterate through the list of results to extract the key and value for each host, use an iteration activity, e.g. Custom ForEach and use a logging/assign activity to display/assign the iterator.Key and iterator.Value:

Image AddedImage Added


If you only wish to extract a specific element from the list, use Get KeyValuePair activity based on Index or Key value.