Migrate setup and configuration of environment variables into role.
This commit is contained in:
parent
b6693c147b
commit
3d3ab570d6
|
@ -1,21 +0,0 @@
|
|||
# Basic environmental
|
||||
ENVIRONMENTAL_NAME = "Vagrant"
|
||||
TESTING = False
|
||||
DEBUG = True
|
||||
|
||||
# Password salts + secrets
|
||||
PASSWORD_SALT = "secret"
|
||||
SECRET_KEY = "development"
|
||||
USER_REGISTRATION_INVITE_KEY = None
|
||||
|
||||
# Database
|
||||
DATABASE_URI = "mysql+mysqlconnector://rookeries:penguin2013flight@localhost:3306/rookeries?charset=utf8"
|
||||
|
||||
# Mail server configuration
|
||||
MAIL_SERVER = "localhost"
|
||||
MAIL_PORT = 25
|
||||
MAIL_USERNAME = "admin@rookeri.es"
|
||||
MAIL_PASSWORD = "password"
|
||||
MAIL_DEFAULT_SENDER = "admin@rookeri.es"
|
||||
MAIL_USE_TLS = False
|
||||
MAIL_USE_SSL = False
|
|
@ -12,3 +12,26 @@ rookeries_app_name: rookeries
|
|||
|
||||
# The mode of the setup. Setting to "dev" enables the use of a SMTP fake server to help with development.
|
||||
rookeries_environ_type: dev
|
||||
|
||||
# The default configuration for running rookeries
|
||||
rookeries_app_config:
|
||||
|
||||
# Basic environmental
|
||||
rookeries_environmental_name: "Vagrant"
|
||||
rookeries_debug: true
|
||||
|
||||
# Password salts + secrets
|
||||
rookeries_password_salt: "secret"
|
||||
rookeries_secret_key: "development"
|
||||
|
||||
# Database
|
||||
rookeries_database_uri: "mysql+mysqlconnector://{{ rookeries_db. username}}:{{ rookeries_db.password }}@localhost:3306/{{ rookeries_db.db_name }}?charset=utf8"
|
||||
|
||||
# Mail server configuration
|
||||
rookeries_mail_server: "localhost"
|
||||
rookeries_mail_port: 25
|
||||
rookeries_mail_username: ""
|
||||
rookeries_mail_password: ""
|
||||
rookeries_mail_default_sender: "admin@local_rookeries_install.localhost.net"
|
||||
rookeries_mail_use_tls: false
|
||||
rookeries_mail_use_ssl: false
|
||||
|
|
|
@ -125,4 +125,5 @@ dependencies:
|
|||
app_name: "{{ rookeries_app_name }}",
|
||||
app_nginx_hostname: localhost,
|
||||
app_uwsgi_port: 8001,
|
||||
app_uwsgi_executable: "rookeries:make_rookeries_app()" }
|
||||
app_uwsgi_executable: "rookeries:make_rookeries_app()",
|
||||
app_uwsgi_envs: "{{ rookeries_app_config }}"}
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
- python-mysqldb
|
||||
|
||||
- name: setup MySQL databases for rookeries.
|
||||
mysql_db: name={{ item.key }} state=present
|
||||
with_dict: databases
|
||||
mysql_db: name={{ rookeries_db.db_name }} state=present
|
||||
|
||||
- name: add MySQL database users for rookeries.
|
||||
mysql_user: name={{ rookeries_db.username }} password={{ rookeries_db.password }} priv={{ rookeries_db.db_name }}:ALL
|
||||
|
|
Loading…
Reference in New Issue