Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
comp90023-assignment-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Matthew O'Halloran
comp90023-assignment-2
Commits
40f39b0f
Commit
40f39b0f
authored
Apr 29, 2020
by
matt01671
Browse files
Options
Downloads
Patches
Plain Diff
cluster sg
parent
f66639fc
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ansible/all-in-one.yaml
+5
-1
5 additions, 1 deletion
ansible/all-in-one.yaml
ansible/host_vars/nectar.yaml
+7
-0
7 additions, 0 deletions
ansible/host_vars/nectar.yaml
ansible/roles/cluster-security-group/tasks/main.yaml
+27
-0
27 additions, 0 deletions
ansible/roles/cluster-security-group/tasks/main.yaml
with
39 additions
and
1 deletion
ansible/all-in-one.yaml
+
5
−
1
View file @
40f39b0f
...
...
@@ -7,6 +7,7 @@
-
role
:
openstack-common
-
role
:
openstack-volume
-
role
:
openstack-security-group
-
role
:
cluster-security-group
-
role
:
openstack-instance
-
hosts
:
instances
...
...
@@ -27,3 +28,6 @@
roles
:
-
role
:
react-build
-
hosts
:
dbs
\ No newline at end of file
This diff is collapsed.
Click to expand it.
ansible/host_vars/nectar.yaml
+
7
−
0
View file @
40f39b0f
...
...
@@ -25,6 +25,13 @@ security_groups:
port_range_max
:
80
remote_ip_prefix
:
0.0.0.0/0
cluster_security_group
:
-
name
:
couchDB-cluster
description
:
"
Security
group
for
CouchDB
cluster"
protocol
:
tcp
port_name_mix
:
3306
port_name_max
:
3306
# Instance
instances
:
# - name: harvester
...
...
This diff is collapsed.
Click to expand it.
ansible/roles/cluster-security-group/tasks/main.yaml
0 → 100755
+
27
−
0
View file @
40f39b0f
---
# Create a security group
-
name
:
Create a security group
os_security_group
:
name
:
'
{{
item.name
}}'
description
:
'
{{
item.description
}}'
state
:
present
loop
:
'
{{
cluster_security_group
}}'
-
name
:
Create a list of security group names
set_fact
:
sg_names
:
'
{{
sg_names|default([])
+
[
item.name
]
}}'
loop
:
'
{{
cluster_security_group
}}'
-
debug
:
msg
:
"
Security
group(s)
{{
sg_names
}}
have
been
created."
# Create security group rules
-
name
:
Create security group rules
os_security_group_rule
:
security_group
:
'
{{
item.name
}}'
protocol
:
'
{{
item.protocol
}}'
port_range_min
:
'
{{
item.port_range_min
}}'
port_range_max
:
'
{{
item.port_range_max
}}'
remote_group
:
'
{{
sg_names
}}'
state
:
present
loop
:
'
{{
cluster_security_group
}}'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment