Ansible tasks

1. Properties

The AnsibleTasks component has the same properties as the Bash component but with additional properties:

  • ansible_become: Set to true to run the ansible tasks with root privileges.
  • ignore_errors: Set to true for the orchestrator to ignore any errors during the execution of this ansible tasks and continues in the next steps.

2. Examples

2.1. Provide an ansible task

  • Write an ansible task (e.g., configure.yml) as follows:
- debug:
msg:
- "{{ NODE }} is running on {{ HOST }} on port {{ PORT }}"
- "{{ NODE }} has environment variable FOO with value: {{ FOO }}"
  • Put AnsibleTasks on a compute.
  • Select configure.yml in the configure artifact of the AnsibleTasks.

Fig. Ansible tasks configure

2.2. Provide ansible variables

  • Set the port property to 8080.
  • Set an env property with key FOO value bar.

Fig. Ansible tasks

3. Expected result

During the deployment, the orchestrator starts an ansible controller (container) and applies the ansible tasks on the target Compute.

AnsibleTasks is running on Compute on port 8080
AnsibleTasks has environment variable FOO with value: bar