diff --git a/config/rookeries_webapp_config.cfg b/config/rookeries_webapp_config.cfg deleted file mode 100644 index 4646799..0000000 --- a/config/rookeries_webapp_config.cfg +++ /dev/null @@ -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 diff --git a/defaults/main.yml b/defaults/main.yml index 8b497b3..b7fd83d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/meta/main.yml b/meta/main.yml index cedc1fc..5a974a8 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -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 }}"} diff --git a/tasks/mysql_db.yaml b/tasks/mysql_db.yaml index 117f233..85b48a8 100644 --- a/tasks/mysql_db.yaml +++ b/tasks/mysql_db.yaml @@ -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