Skip to content
Snippets Groups Projects
Commit 6e676336 authored by matt01671's avatar matt01671
Browse files

cluster servers

parent db1c3bee
No related branches found
No related tags found
No related merge requests found
...@@ -3,13 +3,13 @@ availability_zone: melbourne-qh2-uom ...@@ -3,13 +3,13 @@ availability_zone: melbourne-qh2-uom
# Volume # Volume
volumes: volumes:
- vol_name: db-volume-1 - vol_name: dbvolume1
vol_size: 10 vol_size: 10
- vol_name: db-volume-2 - vol_name: dbvolume2
vol_size: 10 vol_size: 10
- vol_name: db-volume-3 - vol_name: dbvolume3
vol_size: 10 vol_size: 10
- vol_name: web-volume - vol_name: webvolume
vol_size: 10 vol_size: 10
# Security group # Security group
...@@ -31,25 +31,26 @@ cluster_security_group: ...@@ -31,25 +31,26 @@ cluster_security_group:
- name: couchDB-cluster - name: couchDB-cluster
description: "Security group for CouchDB cluster" description: "Security group for CouchDB cluster"
protocol: tcp protocol: tcp
port_name_mix: 3306 port_range_min: 3306
port_name_max: 3306 port_range_max: 3306
sg_remote_group: couchDB-cluster
# Instance # Instance
instances: instances:
- name: db-1 - name: db1
volumes: ['db-volume-1'] volumes: ['dbvolume1']
meta: meta:
group: dbs group: dbs
- name: db-2 - name: db2
volumes: ['db-volume-2'] volumes: ['dbvolume2']
meta: meta:
group: dbs group: dbs
- name: db-3 - name: db3
volumes: ['db-volume-3'] volumes: ['dbvolume3']
meta: meta:
group: dbs group: dbs
- name: web - name: web
volumes: ['web-volume'] volumes: ['webvolume']
meta: meta:
group: web group: web
......
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
- name: Create a list of security group names - name: Create a list of security group names
set_fact: set_fact:
sg_names: '{{ sg_names|default([]) + [ item.name ] }}' cluster_sg_names: '{{ cluster_sg_names|default([]) + [ item.name ] }}'
loop: '{{ cluster_security_group }}' loop: '{{ cluster_security_group }}'
- debug: - debug:
msg: "Security group(s) {{ sg_names }} have been created." msg: "Security group(s) {{ cluster_sg_names }} have been created."
# Create security group rules # Create security group rules
- name: Create security group rules - name: Create security group rules
...@@ -22,6 +22,6 @@ ...@@ -22,6 +22,6 @@
protocol: '{{ item.protocol }}' protocol: '{{ item.protocol }}'
port_range_min: '{{ item.port_range_min }}' port_range_min: '{{ item.port_range_min }}'
port_range_max: '{{ item.port_range_max }}' port_range_max: '{{ item.port_range_max }}'
remote_group: '{{ sg_names }}' remote_group: '{{ item.sg_remote_group }}'
state: present state: present
loop: '{{ cluster_security_group }}' loop: '{{ cluster_security_group }}'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment