All Products
Search
Document Center

CloudOps Orchestration Service:ACS::ECS::ApplyAnsiblePlayBook

Last Updated:Jun 18, 2026

Description

Runs an Ansible playbook on an ECS instance. This action supports only instances that run CentOS, Alibaba Cloud Linux, or Ubuntu.

Syntax

Action: ACS::ECS::ApplyAnsiblePlayBook
Properties:
 regionId: String
 instanceId: String
 sourceType: String
 sourcePath: String
 playbookFile: String
 tokenInfo: String
 hosts: String
 installDependencies: Boolean
 workingDir: String
 check: Boolean
 extraVariables: String
 verbose: String

Attributes

Attribute

Description

Type

Required

Default Value

Limit

regionId

The region ID.

String

No

{{ ACS::RegionId }}

instanceId

The ID of the ECS instance.

String

Yes

sourceType

The storage type of the playbook.

String

Yes

sourcePath

The URL of the playbook, such as https://example.com/playbook.yml.

String

Yes

playbookFile

The name of the playbook to run. Example: example.yml.

String

Yes

tokenInfo

The token used to download the playbook. Required only when downloading from GitHub.

String

No

hosts

The hosts on which the playbook runs.

String

No

/etc/ansible/hosts

installDependencies

Specifies whether to install dependencies. If set to True, CloudOps Orchestration Service (OOS) installs Ansible and its dependencies, including Python, from the Python Package Index (PyPI) repository. If set to False, OOS checks whether Ansible and its dependencies are already installed on the ECS instance.

Boolean

No

True

workingDir

The directory in which the playbook runs.

String

No

/root/ansible-workspace

check

Specifies whether to run the Ansible playbook in check mode (dry run).

Boolean

No

True

extraVariables

Extra variables passed to Ansible at runtime, specified as space-separated key-value pairs. Example: color=red flavour=lime.

String

No

color=red

Regular expression for string verification: ^$

verbose

The verbosity level for logging playbook execution. Valid values: -v (low), -vv or -vvv (medium), and -vvvv (debug).

String

No

-v

Output

Output item

Description

Type

commandOutput

String

References

For the source code, see ACS::ECS::ApplyAnsiblePlayBook.yml on GitHub.