Skip to content

Jason-Zhang9309/huaweicloud-ansible-modules

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Collection for Huaweicloud

This collection includes a series of Ansible modules for interacting with Huaweicloud.

Prerequisite

The usage of this collection assumes that you've already setup an Ansible environment for HuaweiCloud.

Installed the ansible in your environment.

Installation

Install dependencies.

pip install -r requirements.txt

Install the collection.

$ ansible-galaxy collection install hwceco.hwcollection

Upgrade to the lastet version of the collection.

$ ansible-galaxy collection install hwceco.hwcollection --force

Example Playbook

$ cat test.yml
- hosts: localhost
  collections:
    - hwceco.hwcollection
  tasks:
	- name: create a new vpc
	  hwc_vpc:
		access_key: "{{ access_key }}"
		secret_key: "{{ secret_key }}"
		project_id: "{{ project_id }}"
		region: "{{ region }}"

		name: "{{ vpc_name }}"
		cidr: "192.168.100.0/24"
		state: present
	  register: vpc 
	- name: dump the output
	  debug:
		msg: '{{ vpc }}'

Run ansible

$ ansible-playbook test.yml

License

Apache 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%