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 15 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: Boolean): outputs true or false if operation succeeded.



Inventory Delete

This activity deletes the specified groups and/or hosts from the inventory.

Activity Parameters

The Inventory Delete 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. 
  • Hosts (text box editor type) (type: String[]): enter hosts array of strings to be deleted from the specified group .E.g. New String() {"hostname1", "hostname2"} . If left empty, the group will be deleted from inventory.

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

  • Output (type: Boolean): outputs true or false if operation succeeded.


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.



Inventory Update

This activity updates the specified groups and/or hosts from the inventory.

Activity Parameters

The Inventory Update 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.
  • Groups (collection editor type) (type: string): enter the old name and new name for the groups to be updated. E.g. when the collection editor opens, add a new member for each item to be updated, where Name = old value and Value = new value.
  • Hosts (collection editor type) (type: string): enter the old name and new name for the hosts to be updated. E.g. when the collection editor opens, add a new member for each item to be updated, where Name = old value and Value = new value.
  • IPs (collection editor type) (type: string): enter the old IP and new IP for all IPs to be updated. E.g. when the collection editor opens, add a new member for each item to be updated, where Name = old value and Value = new value.

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

  • Output (type: Boolean): outputs true or false if operation succeeded.


Playbook Create

This activity creates a new playbook on a specified path.

Activity Parameters

The Playbook 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.
  • Path (text box editor type) (type: string): enter the file path where the playbook will be created. E.g. /home/user/MyPlaybook.yml . If the file already exists, it will be overwritten.
  • Script (command editor type) (type: string): enter the ansible script. Use $using:variableName for external workflow variables / arguments or the ansible {{argument1}} format.

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

  • Output (type: Boolean): outputs true or false if operation succeeded.

Playbook Delete

This activity deletes the specified playbook.

Activity Parameters

The Playbook Delete 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.
  • Path (text box editor type) (type: string): enter the file path of the playbook that will be executed. E.g. /home/user/MyPlaybook.yml.

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

  • Output (type: string): outputs true or false if operation succeeded.



Playbook Execute

This activity executes a specified playbook with/ without arguments.

Activity Parameters

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



Parameters:

  • Arguments (text box editor type) (type: string): enter the playbook arguments. E.g. myArgument1=test1 myArgument2=test2
  • 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.
  • Path (text box editor type) (type: string): enter the file path of the playbook that will be executed. E.g. /home/user/MyPlaybook.yml.

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

  • Output (type: string): outputs the playbook execution result.


Playbook Read

This activity reads the specified playbook.

Activity Parameters

The Playbook 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.
  • Path (text box editor type) (type: string): enter the file path of the playbook that will be executed. E.g. /home/user/MyPlaybook.yml.

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

  • Output (type: string): outputs the playbook content.

Playbook Update

This activity updates the specified playbook.

Activity Parameters

The Playbook Update 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.
  • Path (text box editor type) (type: string): Enter the file path of the playbook to be updated. If the file does not exist, the activity will throw an error. E.g. /home/user/MyPlaybook.yml
  • Script (command editor type) (type: string): enter the ansible script. Use $using:variableName for external workflow variables / arguments or the ansible {{argument1}} format.

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

  • Output (type: Boolean): outputs true or false if operation succeeded.

Script Execution

This activity executes ansible script on each host from inventory.

Activity Parameters

The Script Execution 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.
  • Command (text box editor type) (type: string): enter the command . E.g. 'date' will display current date time on each host.

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

  • Output (type: String): Outputs the ansible command result



  • No labels