1
0
mirror of https://github.com/krislamo/vagrant-easyredmine synced 2024-11-09 22:40:36 +00:00

improve Ansible support for production vs vagrant installs

This commit is contained in:
Mark Heiges 2015-12-27 15:37:23 -05:00
parent 342ea54a6f
commit ba9c5049a1
6 changed files with 25 additions and 19 deletions

View File

@ -11,9 +11,13 @@ Once provisioned, Redmine should be available at http://redmine.vm.apidb.org/
## Requirements
- `rvm1-ansible` Ansible module
- Vagrant installed on your local host
ansible-galaxy install rvm_io.rvm1-ruby
- Ansible [installed on your local host](http://docs.ansible.com/ansible/intro_installation.html)
- `rvm1-ansible` Ansible module installed on your local host
$ ansible-galaxy install rvm_io.rvm1-ruby
- Vagrant `landrush` plugin
@ -21,7 +25,7 @@ Once provisioned, Redmine should be available at http://redmine.vm.apidb.org/
- `scratch/redmine_dump.sql.gz` - a mysql dump of our production
database. _(One of the daily backups on our production Redmine server
is suitable. See `/var/lib/mysql.backups/daily/redmine/`.)_ This is
is suitable. See `/var/lib/mysql.backups/daily/easyredmine/`.)_ This is
optional. To have the redmine installer create an empty database, set
`do_redmine_db_import` to `False` in `config.yml`

9
Vagrantfile vendored
View File

@ -2,8 +2,7 @@ Vagrant.configure(2) do |config|
config.ssh.forward_agent = 'true'
config.vm.box = "ebrc/centos-7.1-64-nocm"
config.vm.box_url = 'http://software.apidb.org/vagrant/centos-7.1-64-nocm.json'
config.vm.box = "ebrc/centos-7-64-puppet"
config.vm.hostname = 'redmine.vm.apidb.org'
config.vm.network :private_network, type: 'dhcp'
@ -13,9 +12,9 @@ Vagrant.configure(2) do |config|
config.landrush.tld = 'vm.apidb.org'
end
config.vm.provision 'bootstrap', type: 'ansible' do |ansible|
ansible.playbook = 'bootstrap.yml'
end
# config.vm.provision 'bootstrap', type: 'ansible' do |ansible|
# ansible.playbook = 'bootstrap.yml'
# end
config.vm.provision 'deploy', type: 'ansible' do |ansible|
ansible.playbook = 'playbook.yml'

View File

@ -2,15 +2,16 @@
- hosts: all
sudo: false
gather_facts: false
#vars_files:
# - production_config.yml
vars_files:
#- production_config.yml
- config.yml
tasks:
# match uid with NFS server
- name: Create user of Redmine installation
user: name='{{ redmine_owner }}'
uid=1303
uid='{{ redmine_uid }}'
state=present
ssh_key_file=.ssh/id_rsa

View File

@ -1,11 +1,12 @@
redmine_mail_alias: redmine@localhost
redmine_owner: vagrant
redmine_uid: ''
redmine_owner_ssh_pub_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAvijH8y7CL9TxWCucjgXRa2q3l0Nc9JW7/SAFHVgt/FYClenS0DMN0nGm1I4z2mtftt8gHz5f6PNqyvfc3F0JcOqiuH9qP79FQ6c8rDmqQEqOuBrufPX11y/9IESIJ0aQ5feQP+WooR6bo/O7BFJS005S3foA/iLphf+smLrW44k= mheiges@sapote.local
- ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBKXyFF/K1AT52FGrq5Z27guGgHDELy8W8NInAgrDQZQP+U5ORs9wB8SsuD8vyhYy3G2Tz8xAKCxWcFHvuNDv4VIg8D6ge7VMdWHGtbS8UC153dK3mMQ+CMTgJsezqgk0j4/ot7LaQ6yurb8t27TOHeqEdHyB5O/eL6pYntsKqEWQ== mguidry@uga.edu
do_database_management: True # no import unless management == true
do_redmine_db_import: True
do_database_management: True
do_redmine_db_import: True # no import unless do_database_management is also true
do_redmine_installer: True
remote_scratch_path: /vagrant/scratch
nginx_pem: redmine.vm-rsa.pem

View File

@ -3,6 +3,7 @@
- include: system.yml tags=system
- include: firewall.yml tags=firewall
when: is_production_vm == True
- include: database.yml tags=database
when: do_database_management == True

View File

@ -41,12 +41,6 @@
mode=750
sudo: no
- name: add redmine IMAP fetch script
template: dest='{{ redmine_root_dir }}/script/redmine_receive_imap'
src=redmine_receive_imap.j2
mode=750
sudo: no
- name: delete contents of redmine root directory
file: path='{{ redmine_root_dir }}'
state=absent
@ -89,6 +83,12 @@
user='{{ redmine_owner }}'
sudo: yes
- name: add redmine IMAP fetch script
template: dest='{{ redmine_root_dir }}/script/redmine_receive_imap'
src=redmine_receive_imap.j2
mode=750
sudo: no
- name: adding redmine_receive_imap crontab
cron: name="fetch from imap"
minute="*/5"