Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 7 Next »

Activities


Connect to Ansible

This activity connects to Ansible.The Output of this activity should be used as input for all Connection parameters used for activities placed under Ansible category.

Activity Parameters

The Connect to Ansible activity parameters can be provided by manual inserted values or via IN arguments or variables:



Parameters:

  • Host name / IP Address (text box editor type) (type: string): the DNS name or IP Address of the SSH host.
  • Password (password editor type) (type: string): the password for the provided username.
  • Password Binding (text box editor type) (type: string): bind to a variable containing the encrypted password for the SSH host. (This parameter is used only when the user wants to send an encrypted password from outside the workflow, for example Flowster Portal).
  • SSH Port (text box editor type) (type: Int32): default value for the SSH port is 22.
  • SSH Timeout (text box editor type) (type: Int32): default value for the SSH timeout is 60 seconds to establish a SSH connection to the specified host. 
  • Username (text box editor type) (type: string): the username to connect to the SSH Ansible host.E.g. 'root'

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

  • Connection (type: object): outputs an Ansible Connection. This parameter should be used as input for all Connection parameters used for activities placed under Ansible category.
 


Disconnect from Ansible

This activity disconnects from Ansible.

Activity Parameters

The Disconnect from Ansible activity parameters can be provided by manual inserted values or via IN arguments or variables:

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.



Check Host

This activity checks if host(s) exists (ansible command ping).

Activity Parameters

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



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.
  • 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 returned ansible command result (ping) for each host.

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:


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



Inventory Create

This activity adds the specified groups and/or hosts to the inventory.

Activity Parameters

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



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 to be created. E.g. Flowster. If the group does not exist, it will be automatically created.
  • Hosts (collection editor type) (type: string): enter the hosts associated with machines IP . E.g. host1 and machine IP 10.201.0.45

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 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:



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:


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


  • No labels