GithubHelp home page GithubHelp logo

ansible-provider's Introduction

Ansible ECS Module

Ansible Alicloud Module is a new ansible module, and you can manage Alicloud ECS and other services more flexibly and conveniently via it. Next to introduce simply this module.

lib/ansible/modules/cloud/alicloud

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

  • alicloud_instance.py: Create, Start, Stop, Restart or Terminate an Instance in ECS. Add or Remove Instance to/from a Security Group

  • alicloud_disk.py: Create, Attach, Detach or Delete a disk in ECS

  • alicloud_security_group.py: Create or Delete a Security Group

  • alicloud_vpc.py: Create or Delete a Vpc.

  • alicloud_vswitch.py: Create or Delete a VSwitch.

  • alicloud_route_entry.py: Create or Delete a route entry.

  • alicloud_slb_lb.py: Create or Delete a Load balancer.

  • alicloud_slb_listener.py: Create or Delete a listener for one Load balancer.

  • alicloud_slb_server.py: Add or Remove backend server to/from Load balancer.

  • alicloud_ess_group.py: Create or Delete a scaling group.

  • alicloud_ess_configuration.py: Create or Delete a scaling configuration.

  • alicloud_ess_instance.py: Add or Remove ECS instnaces in a specified scaling group.

  • alicloud_ess_task.py: Create or Delete a scheduled task for scaling activity.

  • alicloud_ess_rule.py: Create or Delete a scaling rule.

  • alicloud_bucket.py: Create or Delete an OSS bucket.

  • alicloud_bucket_object.py: Upload or Download an object to/from an OSS bucket.

lib/ansible/module_utils

In the module utils directory, the file alicloud_ecs.py 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.

examples

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

Install

There are two ways to install alicloud provider. However, before installing it. you should ensure Ansible has existed in your server. If not, please install it using the following command:

sudo pip install ansible
  • First one

    Ansible provider has been released, and you can install it easily using the following command:

    sudo pip install ansible_alicloud
    
  • Second one

    Ansible provider's modules support to install independently. That means you can download one or more modules from lib/ansible/modules/cloud/alicloud and then run them independently. However, before running them, you should ensure ansible_alicloud_module_utils has existed in your server. If not, please install it using the following command:

    sudo pip install ansible_alicloud_module_utils
    

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
    

Refrence

Ansible Document: https://docs.ansible.com/ansible/latest/

Ansible Alicloud: Docs Details

ansible-provider's People

Contributors

xiaozhu36 avatar shrutikamendhe avatar shuwei-yin avatar demonwy avatar itssajan avatar

Watchers

James Cloos avatar Carsten Schabacker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.