Created
August 4, 2014 17:04
-
-
Save danrough/65ae1e4838b4256cf265 to your computer and use it in GitHub Desktop.
Create test environment using rax modules playbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Gather information from the inventory file about all hosts for later use | |
hosts: all | |
gather_facts: no | |
- name: Build test infrastructure | |
hosts: localhost | |
gather_facts: no | |
connection: local | |
tasks: | |
- name: Add internal network | |
rax_network: label=internal cidr=192.168.3.0/24 state=present region=LON | |
credentials=~/pyrax-uk.creds | |
register: network | |
- name: debug inventory file data | |
debug: var=hostvars[groups['load_balancer'][0]]['inventory_hostname'] | |
- name: Gather information from test load balancer | |
rax_clb: name=london-load-balancer port=443 protocol=HTTPS algorithm=RANDOM | |
type=PUBLIC region=LON state=present wait=true | |
credentials=~/pyrax-uk.creds | |
register: lb | |
- name: debug lb data | |
debug: var=lb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment