Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

Ansible modules for vscale.io

  • Module features:
    • Creates scalets
    • Deletes scalets
    • Rebuild, upgrades scalets
    • Provides scalets power management
    • Collects ansible facts after creation of scalet

Requirements:

  • python-requests

Options for vscale_scalets module:

Options:

  • token:
  • state:
    • Indicate desired state of scalet.
  • name:
    • Name of scalet. Must be unique.
  • hostname:
    • Name to set as scalet system hostname. Defaults to None which equals value to "name" variable.
  • key_name:
    • Name of SSH key (optional).
  • password:
    • Password for new scalet (optional).
  • power_state:
    • Power state of scalet. Default is "started".
  • rebuild:
    • Reinstall scalet.
  • upgrade:
    • Upgrade scalet billing plan.
  • image:
    • Scalet template name. Need for create and upgrade scalet
  • plan:
    • Billing plan of scalet
  • location:
    • Region ID for create scalet
  • collect_facts:
    • If you want to get ansible facts after creation of scalet, set this option to yes

Usage examples:

Create a new scalet with SSH key and collect facts after creation:

- vscale_scalets:
    token: "{{ lookup('env', 'VS_API_KEY')}}"
    name: test_scalet
    plan: small
    location: spb0
    image: ubuntu_16.04_64_001_master
    key_name: key_name1, key_name2
    collect_facts: yes
    state: present

Create a new scalet with password

- vscale_scalets:
    token: "{{ lookup('env', 'VS_API_KEY')}}"
    name: test_scalet
    plan: small
    location: spb0
    image: ubuntu_16.04_64_001_master
    password: 123456789
    state: present

Upgrade scalet's billing plan

- vscale_scalets:
    token: "{{ lookup('env', 'VS_API_KEY')}}"
    name: test_scalet
    plan: huge
    upgrade: yes
    state: present

Restart scalet

- vscale_scalets:
    token: "{{ lookup('env', 'VS_API_KEY')}}"
    name: test_scalet
    power_state: restarted
    state: present

Rebuild scalet

- vscale_scalets:
    token: "{{ lookup('env', 'VS_API_KEY')}}"
    name: test_scalet
    rebuild: yes
    state: present

Options for vscale_ssh module:

Options:

  • token:
    • Vscale API token
  • state:
    • Indicate desired state of SSH key.
  • name:
    • Name of SSH key
  • public_key:
    • SSH key string for add key
  • collect_facts:
    • Gather facts about SSH key after creation

Usage examples:

Create a new SSH key

- vscale_ssh:
    token: "{{ lookup('env', 'VS_API_KEY')}}"
    name: key_name
    public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub')}}"
    state: present

Create a new SSH key and gather facts

- vscale_ssh:
    token: "{{ lookup('env', 'VS_API_KEY')}}"
    name: key_name
    public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub')}}"
    state: present

Delete SSH key from account

- vscale_ssh:
    token: "{{ lookup('env', 'VS_API_KEY')}}"
    name: key_name
    state: absent

About

Ansible modules for vscale.io

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.