ANSIBLE.RAX(3)

NAME
rax - create / delete an instance in Rackspace Public Cloud

DESCRIPTION

creates / deletes a Rackspace Public Cloud instance and optionally waits for it to be 'running'.

OPTIONS

api_key
    Rackspace API key (overrides credentials)

credentials
    File to find the Rackspace credentials in (ignored if api_key and username are provided)

files
    Files to insert into the instance. remotefilename:localcontent

flavor
    flavor to use for the instance

image
    image to use for the instance

key_name
    key pair to use on the instance

meta
    A hash of metadata to associate with the instance

name
    Name to give the instance

region
    Region to create an instance in (default: DFW)

service
    Cloud service to interact with Choices: cloudservers. (default: cloudservers)

state
    Indicate desired state of the resource Choices: present,active,absent,deleted. (default: present)

username
    Rackspace username (overrides credentials)

wait
    wait for the instance to be in state 'running' before returning Choices: yes,no. (default: no)

wait_timeout
    how long before wait gives up, in seconds (default: 300)."

NOTES

The following environment variables can be used, RAX_USERNAME, RAX_API_KEY, RAX_CREDS, RAX_CREDENTIALS, RAX_REGION.

RAX_CREDENTIALS and RAX_CREDS points to a credentials file appropriate for pyrax

RAX_USERNAME and RAX_API_KEY obviate the use of a credentials file

RAX_REGION defines a Rackspace Public Cloud region (DFW, ORD, LON, ...)
- name: Build a Cloud Server
  gather_facts: False
  tasks:
    - name: Server build request
      local_action:
        module: rax
        credentials: ~/.raxpub
        service: cloudservers
        name: rax-test1
        flavor: 5
        image: b11d9567-e412-4255-96b9-bd63ab23bcfe
        files:
          /root/.ssh/authorized_keys: /home/localuser/.ssh/id_rsa.pub
          /root/test.txt: /home/localuser/test.txt
        wait: yes
        state: present

AUTHOR
Jesse Keating

SEE ALSO
ansible(1), http://ansible.github.com/modules.html#rax