Commit 958decd0 authored by Daniel Buøy-Vehn's avatar Daniel Buøy-Vehn

dev

parent eb99f038
---
- hosts: all
become: no
gather_facts: no
vars:
os_auth:
auth_url: 'https://iaas.redpill-linpro.com/api/identity/v3'
username: 'dbv'
password: "{{ os_password }}"
project_name: 'users.dbv'
domain_name: 'redpill-linpro'
os_network:
ip_version: '4'
cidr: 10.0.0.0/24
network_name: "{{ os_host_network }}"
tasks:
- name: RUN ALL COMMANDS AGAINST LOCALHOST
block:
- name: "CREATE NETWORK IN OPENSTACK [ {{ os_host_network }} ]"
os_network:
state: present
admin_state_up: Yes
auth: "{{ os_auth }}"
name: "{{ os_host_network }}"
tags: network
- name: "CREATE SUBNET IN OPENSTACK [ {{ os_host_subnet }} ]"
os_subnet:
state: present
auth: "{{ os_auth }}"
name: "{{ os_host_subnet }}"
enable_dhcp: True
ip_version: "{{ os_network.ip_version }}"
network_name: "{{ os_network.network_name }}"
cidr: "{{ os_network.cidr }}"
tags: network
- name: "CREATE ROUTER IN NETWORK [ {{ os_network_router }}]"
os_router:
name: "{{ os_network_router.name }}"
state: "{{ os_network_router.state | default('present') }}"
auth: "{{ os_auth }}"
admin_state_up: "{{ os_network_router.admin_state_up | default(True) }}"
network: "{{ os_network_router.network }}"
interfaces: "{{ os_network_router.interfaces | default(omit) }}"
tags: router
- name: "CREATE MACHINE IN OPENSTACK [ {{ os_host_name }} ]"
os_server:
state: present
auth: "{{ os_auth }}"
name: "{{ os_host_name }}"
image: "{{ os_host_image }}"
flavor: "{{ os_host_flavor }}"
reuse_ips: True
floating_ip_pools: 'Internet (osl2)'
security_groups: "{{ os_host_securitygroups | default(omit) }}"
key_name: "{{ os_host_keyname }}"
timeout: "{{ os_host_timeout | default(100) }}"
nics:
- net-name: 'rl_conference_demo'
tags: host
- name: "CREATE MACHINE IN OPENSTACK [ docker01.example.com ]"
os_server:
state: present
auth: "{{ os_auth }}"
name: docker01.example.com
image: "{{ os_host_image }}"
flavor: "{{ os_host_flavor }}"
reuse_ips: True
floating_ip_pools: 'Internet (osl2)'
security_groups: "ssh incoming"
key_name: "{{ os_host_keyname }}"
timeout: "{{ os_host_timeout | default(100) }}"
nics:
- net-name: 'rl_conference_demo'
tags: host
delegate_to: localhost
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment