1
0
mirror of https://github.com/krislamo/vagrant-easyredmine synced 2024-11-13 23:50:34 +00:00

move vars from role to playbook

This commit is contained in:
Mark Heiges 2015-11-20 13:51:11 -05:00
parent 28a318a4e4
commit fcbdd5c85b
3 changed files with 28 additions and 36 deletions

View File

@ -30,7 +30,7 @@ authentication, so no VPN is needed in such case.
Start the virtual machine with `vagrant up`. Start the virtual machine with `vagrant up`.
Vagrant provisions the VM using Ansible. See Vagrant provisions the VM using Ansible. See
`roles/easyredmine/vars/main.yml` for configuration options. Especially, `playbook.yml` for configuration options. Especially,
- `do_redmine_db_import`: if `True`, will import sample data from a - `do_redmine_db_import`: if `True`, will import sample data from a
mysql dump file mysql dump file
@ -40,22 +40,22 @@ the database (e.g. you drop it and let Ansible recreate it).
## Configuration ## Configuration
Most configuration is in `roles/easyredmine/vars/main.yml` Configuration variables are in `playbook.yml`
## EasyRedmine Package ## EasyRedmine Package
Place a copy of the EasyRedmine package (obtained from the vendor Place a copy of the EasyRedmine package (obtained from the vendor
customer portal) in `scratch`. Set the file name for customer portal) in `scratch`. Set the file name for
`installer_package_name` in `roles/easyredmine/vars/main.yml` `installer_package_name` in `playbook.yml`
## Redmine sample data ## Redmine sample data
To install an empty database, set `do_redmine_db_import` to `False` in To install an empty database, set `do_redmine_db_import` to `False` in
`roles/easyredmine/vars/main.yml` `playbook.yml`
To import a copy of an existing Redmine database, place a copy of the To import a copy of an existing Redmine database, place a copy of the
MySQL dump file at `scratch/redmine_dump.sql.gz`. _(One of the daily MySQL dump file at `scratch/redmine_dump.sql.gz`. _(One of the daily
backups on our production Redmine server is suitable. See backups on our production Redmine server is suitable. See
`/var/lib/mysql.backups/daily/redmine/`.)_ `/var/lib/mysql.backups/daily/redmine/`.)_
Set `do_redmine_db_import` to `True` in `roles/easyredmine/vars/main.yml` Set `do_redmine_db_import` to `True` in `playbook.yml`

View File

@ -2,6 +2,29 @@
- hosts: all - hosts: all
sudo: yes sudo: yes
gather_facts: True gather_facts: True
vars:
do_redmine_db_import: True
do_redmine_installer: False
cache_dir: /vagrant/scratch
installer_package_name: easyredmine_package_u2072_d201511101601.zip
installer_package_path: '{{ cache_dir }}/{{ installer_package_name }}'
installer_package_url: 'http://software.apidb.org/source/{{ installer_package_name }}'
redmine_db_dump_file: '{{ cache_dir }}/redmine_unmigrated_dump.sql.gz'
redmine_root_dir: /opt/easyredmine
redmine_db_service_provider: mariadb # or mysqld
redmine_db_name: easyredmine
redmine_db_host: localhost
redmine_db_user: redmine
redmine_db_password: '@redmin3r'
redmine_db_encoding: utf8
redmine_db_port: 3306
redmine_email_addr: mheiges@uga.edu
redmine_email_port: 587
sendmail_path: /usr/sbin/sendmail
sendmail_args: -i -t
_redmine_db_import_file: /tmp/redmine_dump.sql
_redmine_db_import_success: /tmp/redmine_db_import_success
_redmine_install_wrapper: /home/vagrant/install_wrapper
roles: roles:
- { role: easyredmine, sudo: no } - { role: easyredmine, sudo: no }

View File

@ -1,33 +1,2 @@
--- ---
# vars file for easyredmine # vars file for easyredmine
do_redmine_db_import: True
do_redmine_installer: False
cache_dir: /vagrant/scratch
installer_package_name: easyredmine_package_u2072_d201511101601.zip
installer_package_path: '{{ cache_dir }}/{{ installer_package_name }}'
installer_package_url: 'http://software.apidb.org/source/{{ installer_package_name }}'
redmine_db_dump_file: '{{ cache_dir }}/redmine_dump.sql.gz'
redmine_root_dir: /opt/easyredmine
redmine_db_service_provider: mariadb # or mysqld
redmine_db_name: easyredmine
redmine_db_host: localhost
redmine_db_user: redmine
redmine_db_password: '@redmin3r'
redmine_db_encoding: utf8
redmine_db_port: 3306
redmine_email_addr: mheiges@uga.edu
redmine_email_port: 587
sendmail_path: /usr/sbin/sendmail
sendmail_args: -i -t
_redmine_db_import_file: /tmp/redmine_dump.sql
_redmine_db_import_success: /tmp/redmine_db_import_success
_redmine_install_wrapper: /home/vagrant/install_wrapper