Alibaba.alicloud Save

Project README

Alibaba Cloud Collection

The Ansible Alibaba Cloud collection includes a variety of Ansible content to help automate the management of Alibaba Cloud instances. This collection is maintained by the Alibaba Cloud team.

Python version compatibility

This collection requires Python 3.6 or greater.

Installing this collection

You can install the Alibaba Cloud collection with the Ansible Galaxy CLI:

ansible-galaxy collection install -r requirements.txt
  - name: alibaba.alicloud

A specific version of the collection can be installed by using the version keyword in the requirements.yml file:

  - name: alibaba.alicloud
    version: 1.0.0

The python module dependencies are not installed by ansible-galaxy. They can be manually installed using pip:

pip install requirements.txt

Using this collection

You can either call modules by their Fully Qualified Collection Namespace (FQCN), such as alibaba.alicloud.ali_vpc, or you can call modules by their short name if you list the alibaba.alicloud collection in the playbook's collections keyword:

	- name: Create a new alicloud VPC resource
		state: 'present'
		cidr_block: '{{ vpc_cidr }}'
		vpc_name: '{{ name }}'
		description: '{{ vpc_description }}'
	  register: vpc


There are several files in the module directory, and these files describe some function that can operate alicloud products.

  • Create, Start, Stop, Restart or Terminate an Instance in ECS. Add or Remove Instance to/from a Security Group
  • Create, Attach, Detach or Delete a disk in ECS
  • Create or Delete a Security Group
  • Create or Delete a Vpc.
  • Create or Delete a VSwitch.
  • Create or Delete a route entry.
  • Create or Delete a Load balancer.
  • Create or Delete a listener for one Load balancer.
  • Add or Remove backend server to/from Load balancer.
  • Create or Delete a scaling group.
  • Create or Delete a scaling configuration.
  • Add or Remove ECS instnaces in a specified scaling group.
  • Create or Delete a scheduled task for scaling activity.
  • Create or Delete a scaling rule.
  • Create or Delete a network interface.
  • Create or Delete an OSS bucket.
  • Upload or Download an object to/from an OSS bucket.


In the module utils directory, the file identifies and gains playbook params, and provides this params to modules/*.py. In addition, this file implements connection between ansible and Alicloud API via footmark.


There are some playbooks to create some alicloud resource or build infrastructure architecture.

Execute playbook

  • Input your alicloud access key in the playbook or set environment variable:ALICLOUD_ACCESS_KEY and ALICLOUD_SECRET_KEY).

  • Input others resource params in the playbook.

  • execute ansible-playbook command as follows:

    $ ansible-playbook xxx.yml


Ansible Document:

Ansible Alicloud: Docs Details

Open Source Agenda is not affiliated with "Alibaba.alicloud" Project. README Source: alibaba/alibaba.alicloud
Open Issues
Last Commit
4 months ago

Open Source Agenda Badge

Open Source Agenda Rating