Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
- Some final tweaks
  • Loading branch information
russmckendrick committed Jun 5, 2019
1 parent 8f35105 commit 7b7c3db
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 20 deletions.
19 changes: 10 additions & 9 deletions group_vars/wp-dev-schemareview.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---

options:
install_trend: false
bootstrap_database: true
# Some options, this should be accessible via survey

install_trend: true
bootstrap_database_add_user: true
bootstrap_database_create_schema: true
configure_application_gateway: false

# Application vars

app:
name: "wp-dev-schemareview" # this can contain characters such as -, don't get too creative though
shortname: "wpdevschem" # all lower-case, all one word
env: "dev"
env: "dev" #
working_folder: "/wsdocker"

raw_hash: "{{ app.name | hash('sha1') }}" # this creates a hash based on the name of the application
Expand All @@ -35,8 +38,8 @@ couchbase:
bucket: "devbucket" # name of the bucket to create and use
admin_port: "18100"
additional_users:
- { username: 'sync_gateway_test', password: 'fds234fwer23' }
- { username: 'N1QLUSER_test', password: 'fds234fwer23' }
- { username: '{{ sync_gateway.user }}', password: '{{ sync_gateway.password }}' }
- { username: 'N1QLUSER', password: 'fds234fwer23' }

couchbase_bootstrap:
rbac_roles: 'bucket_admin[{{couchbase.bucket}}],bucket_full_access[{{couchbase.bucket}}],views_admin[{{couchbase.bucket}}],views_reader[{{couchbase.bucket}}],data_reader[{{couchbase.bucket}}],data_writer[{{couchbase.bucket}}],data_dcp_reader[{{couchbase.bucket}}],data_backup[{{couchbase.bucket}}],data_monitoring[{{couchbase.bucket}}],fts_admin[{{couchbase.bucket}}],fts_searcher[{{couchbase.bucket}}],query_select[{{couchbase.bucket}}],query_update[{{couchbase.bucket}}],query_insert[{{couchbase.bucket}}],query_delete[{{couchbase.bucket}}],query_manage_index[{{couchbase.bucket}}],replication_target[{{couchbase.bucket}}],analytics_manager[{{couchbase.bucket}}]'
Expand All @@ -53,6 +56,7 @@ sync_gateway:
30306563373237346163333039343661376161313462623036373366313962373763366236396462
3131656633303639330a313537343430626436343239383034316637366532663239633930623632
64663135653631613666633535336338343234353531323038626533393062616133
admin_port: "18200"

ssl_cert_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256
Expand All @@ -62,7 +66,6 @@ ssl_cert_pass: !vault |
3939653631346332330a373432346639666537663535366138643963323363386437303037346432
61326264633365323939336431653465343162613938643134616638643938303361
ssl_cert_name: "whitespace_ssl_cert"

self_signed_cert_name: "self-signed-cert"

containers:
Expand Down Expand Up @@ -193,8 +196,6 @@ vmss_syncgateway:
name: "standard_small"
tier: "standard"

configure_application_gateway: "true"

# Which SSH Key to use? The default should be the one used by AWX
ssh_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC2c5jDHGDdEGGIUC7dX9y1iyX2F/csqpvYYnWEZ2knA1whUBMwiAR+XxXTW1zInd3I4R6z/8zv4rXLDPn8LeTc5cV0zFY5BxVmvyeObEojOHC9l+yiHUaATs99eJIMd4ph+bNnfFV0uN0FusWjR1d6yDkhCizMhYcGo9g4QSx+qyi85BMuXelwmM57DTRZRgs6JnvcgkLXHUQD0cFuvGFMMDLrIVR5CUVUb76EULSQ+gSSkMVlyoF0h1M9PxhJR6VTtb3QXQ7EB6w8oO9Ke831YMSoU44BIEeImbDSXkEQdZPck+l4LmWF2Om6qLSsNsIGsexMRMH7qJNTRfFleTboOZf9YeJrvyDJg1j7075oCKEHXYO83ZpBZ5mU4dpJYeClVwMtGUNwK7lyRH0zNXipWS7Pm9WAYX0sdk/zwIdUV4U9eK7BkDLXQorHf5vBey/2W5nadjqbA7krlDUUbIR5l3LANI/vA5w5VGqdMlPsNOGftzjkgWci757km4sAHUj1b819ckrnHIeCTNSbYuAKREiLUAo5B2b8vjyHU1EXP1rLvIXwMtor8c6TJWGxiouDL3fbmLLZ8SmHOVaYEzduJMaFZ/8dSr1yEk35kG40ZBnhPEyUCEJ+MMjmhy/EvCPihoC6iM/xqHBKp+45nvhcZoP/prTQHRqey9Bjc8HweQ== whitespace-awx"
# ssh_key: "{{lookup('file', '~/.ssh/id_rsa.pub') }}"
2 changes: 0 additions & 2 deletions play-rm-dev-schemareview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@

vars_files:
- group_vars/rm-dev-schemareview.yml
- group_vars/openid-dev.yml

roles:
- roles/server-database-bootstrap-user
Expand Down Expand Up @@ -97,7 +96,6 @@

vars_files:
- group_vars/rm-dev-schemareview.yml
- group_vars/openid-dev.yml

roles:
- roles/server-database-bootstrap-schema
32 changes: 29 additions & 3 deletions play-wp-dev-schemareview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,41 @@
roles:
- roles/server-sync-whitespace

- name: bootstrap the database if needed
- name: bootstrap the database (add create db and add user)
hosts: localhost
connection: local
gather_facts: true

vars_files:
- group_vars/wp-dev-schemareview.yml

roles:
- roles/server-database-bootstrap-user

- name: restart the syncgateway
hosts: vmss_syncgateway
gather_facts: true
become: yes
become_method: sudo

vars_files:
- group_vars/rm-dev-schemareview.yml

tasks:
- name: restart sync_gateway
systemd:
name: "sync_gateway"
state: "started"
enabled: "true"
when: bootstrap_database_add_user == true

- name: bootstrap the database (create the schema)
hosts: localhost
connection: local
gather_facts: true

vars_files:
- group_vars/wp-dev-schemareview.yml
- group_vars/openid-dev.yml

roles:
- roles/server-database-bootstrap
- roles/server-database-bootstrap-schema
8 changes: 4 additions & 4 deletions roles/server-sync-whitespace/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
# Print some information to the screen
########################################################################

- debug:
msg: "The sync gate way username is '{{ sync_gateway.user }}' and password '{{ sync_gateway.password }}'"
tags:
- "application"
# - debug:
# msg: "The sync gate way username is '{{ sync_gateway.user }}' and password '{{ sync_gateway.password }}'"
# tags:
# - "application"
4 changes: 2 additions & 2 deletions roles/server-sync-whitespace/templates/index.html.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<title>{{ ansible_hostname }}</title>
<title>{{ ansible_hostname }} ({{ location }})</title>
<body>
<h1>{{ ansible_hostname }}</h1>
<h1>{{ ansible_hostname }} ({{ location }})</h1>
</body>
</html>

0 comments on commit 7b7c3db

Please sign in to comment.