installAnsibleRoles

Runs an Ansible galaxy requirements file. This operation takes a name or path of the specific requirements file as well as any desired arguments and install the roles.

Inputs

Input Name

Input Code

Required

Description

Input Name

Input Code

Required

Description

Ansible Home

FDANS_INP_ANSIBLE_HOME

No

Absolute directory path where Ansible is installed.

Ansible Requirements File

FDANS_INP_PLAYBOOK

No

Absolute or relative path to Ansible galaxy requirements YAML file.

If the yml file is in the artifacts directory, you do not have to pass anything in this field

Absolute Path Example: /home/ubuntu/ansibleTest/requirements.yml

Relative Path Example: ansibleTest/requirements.yml

Extra Variables

FDANS_INP_EXTRA_VARS

No

Additional variables as key=value, JSON text, or a JSON/YAML file. Formatted as key=value. If passing a JSON/YAML file, you must use an @ before the file name. One pair per line (CLI arg: -e)

Key/Value Example: var1=val1 var2=val1"

JSON Example: {"version":"1.23.45","other_variable":"foo"}

JSON/YAML File Example: @some_file.json

Additional Arguments

FDANS_INP_ADDITIONAL_ARGS

No

Additional CLI Arguments that you want to add.

Artifacts

This operation delegates consumes/produces artifacts decision to the workflow developer. Check Consumes Artifacts on the workflow step editor if this operation requires artifacts to be delivered prior to execution of the script. Check Produces Artifacts on the workflow step editor if this operation creates artifacts. The artifacts folder is available via the FD_ARTIFACTS_DIR variable.

Endpoint Selection

This operation delegates endpoint selection to the workflow developer. The workflow editor will default the selection to "All", which selects all available endpoints associated to the target. Selecting a specific resource will result in selection of endpoints associated to the target which have that resource defined. Ansible must be installed on any endpoint that executes this plugin. The user can use the LOCALHOST endpoint if Ansible is installed on the FlexDeploy server.

Endpoint Execution

This operation delegates endpoint execution to the workflow developer. The workflow editor will default to "Any", which will execute on any one of the selected endpoints, which will be randomly picked from selected endpoints or a specific endpoint where previous step may have executed. Changing this value to "All" to will result in execution on all selected endpoints. This operation will execute on any one of the selected endpoints and will be random in the determination of which one.

Example 

Below you can see an example of inputs used to install multiple roles from the requirements.yml file.

image-20240109-100205.png

Here, we are taking the absolute path of the requirements.yml file.

 

The following macros are not currently supported in the footer:
  • style