From 9e1a9396bb29a23972c08f5a02a77dc7a89595c5 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Sun, 15 Jan 2017 13:55:37 -0800 Subject: [PATCH] Configure mezzanine --- ch13/ansible/container.yml | 31 +++++++++++++++++++++++++++---- ch13/ansible/main.yml | 10 ++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/ch13/ansible/container.yml b/ch13/ansible/container.yml index 495566a..c74821d 100644 --- a/ch13/ansible/container.yml +++ b/ch13/ansible/container.yml @@ -2,11 +2,34 @@ version: "2" defaults: database_name: mezzanine database_user: mezzanine + secret_key: b495a05c396843b6b47ac944a72c92ed + nevercache_key: b5d87bb4e17c483093296fa321056bdc + twitter_access_token_key: 80b557a3a8d14cb7a2b91d60398fb8ce + twitter_access_token_secret: 1974cf8419114bdd9d4ea3db7a210d90 + twitter_consumer_key: 1f1c627530b34bb58701ac81ac3fad51 + twitter_consumer_secret: 36515c2b60ee4ffb9d33d972a7ec350a + mezzanine_proj_app: mezzanine_example + mezzanine_proj_name: "{{ mezzanine_proj_app }}" + locale: en_US.UTF-8 + database_host: postgres + database_port: 5432 + live_hostname: localhost + domains: + - localhost + - 127.0.0.1 + services: # nginx: # image: nginx:1.11 - # mezzanine: - # image: ubuntu:xenial + mezzanine: + image: ubuntu:xenial + expose: + - "80" + ports: + - "8000:80" + dev_overrides: + depends_on: + - postgres memcached: image: ubuntu:xenial expose: @@ -19,9 +42,9 @@ services: postgres: image: postgres:9.6 expose: - - "5432" + - "{{ database_port }}" ports: - - "5432:5432" + - "{{ database_port }}:{{ database_port }}" environment: POSTGRES_USER: "{{ database_user }}" POSTGRES_PASSWORD: "{{ database_password }}" diff --git a/ch13/ansible/main.yml b/ch13/ansible/main.yml index bcf9f3d..1edf3ac 100644 --- a/ch13/ansible/main.yml +++ b/ch13/ansible/main.yml @@ -14,3 +14,13 @@ raw: apt-get -y install python roles: - memcached + +- hosts: mezzanine + gather_facts: false + pre_tasks: + - name: update apt cache + raw: apt-get update + - name: install python + raw: apt-get -y install python + roles: + - role: mezzanine -- 2.44.0