Clean up variable definitions for role and some variables as default variables.

This commit is contained in:
Dorian 2015-03-13 08:36:13 -04:00
parent 2a4142f2b5
commit b6693c147b
3 changed files with 17 additions and 16 deletions

View File

@ -1,2 +1,14 @@
--- ---
# defaults file for ansible-rookeries # defaults file for ansible-rookeries
# Database soecific inforaation
rookeries_db:
db_name: rookeries
username: rookeries
password: system_admin
# Name of the rookeries app
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

View File

@ -10,5 +10,4 @@
with_dict: databases with_dict: databases
- name: add MySQL database users for rookeries. - name: add MySQL database users for rookeries.
mysql_user: name={{ item.value.username }} password={{ item.value.password }} priv={{ item.key }}:ALL mysql_user: name={{ rookeries_db.username }} password={{ rookeries_db.password }} priv={{ rookeries_db.db_name }}:ALL
with_dict: databases

View File

@ -1,21 +1,11 @@
--- ---
# TODO Move into defaults/main.yaml # App name reused from the nginx-uwsgi-supervisor roles
databases:
rookeries:
username: rookeries
password: system_admin
# TODO Move into defaults/main.yaml
rookeries_app_name: rookeries
app_name: "{{ rookeries_app_name }}" app_name: "{{ rookeries_app_name }}"
# The mode of the setup. Setting to "dev" enables the use of a SMTP fake server to help with development.
# TODO Move into defaults/main.yaml
rookeries_environ_type: dev
rookeries_dev_email_server_venv: "{{ virtualenv_root_path }}/mail_server"
# Introduced from deployment playbook # Introduced from deployment playbook
# TODO Reorganize everything
rookeries_venv: "{{ virtualenv_root_path }}/rookeries" rookeries_venv: "{{ virtualenv_root_path }}/rookeries"
rookeries_package: rookeries-0.4.0.tar.bz2 rookeries_package: rookeries-0.4.0.tar.bz2
rookeries_package_path: "../../{{ rookeries_package }}" rookeries_package_path: "../../{{ rookeries_package }}"
# Extra virtualenv if working in a dev environment to provide the mailsink testing server
rookeries_dev_email_server_venv: "{{ virtualenv_root_path }}/mail_server"