d4science-ghn-cluster: Fix the mongo variables for the mongo_cluster_prod group.

dnet-eagle: New mongodb server.
library/roles/mongodb-org: Fix the mongod template. It had fixed paths, now they are all managed by variables.
library/roles/redmine: Remove the rules for not working plugins.
This commit is contained in:
Andrea Dell'Amico 2015-11-19 18:10:24 +01:00
parent 86df770466
commit f73e24e32b
5 changed files with 24 additions and 57 deletions

View File

@ -2,7 +2,8 @@
mongodb_install_from_external_repo: True
mongodb_install_packages: True
mongodb_install_conf: True
mongodb_latest_version: True
# Set to 'latest' if you want to get the latest available package
mongodb_pkg_state: installed
mongodb_start_server: 'no'
mongodb_tcp_port: 27017
mongodb_http_interface: False
@ -21,3 +22,4 @@ mongodb_allowed_hosts:
mongodb_cluster_enabled: False
mongodb_replicaset: storagedev
mongodb_replica_keyfile: '{{ mongodb_dbpath }}/replica_keyfile'

View File

@ -11,20 +11,13 @@
register: external_repo
tags: mongodb
- name: Update the apt cache
apt: update_cache=yes
when: ( external_repo | changed )
ignore_errors: True
tags: mongodb
- name: Install the latest version of mongodb server
apt: pkg={{ item }} state=latest
apt: pkg={{ item }} state={{ mongodb_pkg_state }} update_cache=yes
with_items:
- mongodb-org
when:
- mongodb_install_from_external_repo
- mongodb_install_packages
- mongodb_latest_version
tags: mongodb
- name: Install the mongodb defaults file
@ -49,7 +42,7 @@
- name: Install the cron job that manages log files rotation
template: src=mongo_log_rotate.sh.j2 dest=/etc/cron.daily/mongo_log_rotate owner=root group=root mode=0555
tags: mongodb
tags: [ 'mongodb', 'mongo_logrotate' ]
- name: Ensure mongodb is started
service: name=mongod state=started enabled=yes

View File

@ -5,14 +5,15 @@
# Note: if you run mongodb as a non-root user (recommended) you may
# need to create and set permissions for this directory manually,
# e.g., if the parent directory isn't mutable by the mongodb user.
dbpath=/data/mongo_home
dbpath={{ mongodb_dbpath }}
directoryperdb={{ mongodb_directoryperdb }}
#where to log
logpath=/data/mongo_log.txt
logpath={{ mongodb_logpath }}
logappend=true
port = 27017
port = {{ mongodb_tcp_port }}
# Listen to local interface only. Comment out to listen on all interfaces.
#bind_ip = 127.0.0.1
@ -48,8 +49,11 @@ port = 27017
# Ignore query hints
#nohints = true
# Enable the HTTP interface (Defaults to port 28017).
#httpinterface = true
{% if not mongodb_http_interface %}
# Disable the HTTP interface (Defaults to localhost:28017).
nohttpinterface = true
{% endif %}
# Turns off server-side scripting. This will result in greatly limited
# functionality
@ -64,12 +68,15 @@ port = 27017
# Specify .ns file size for new databases.
# nssize = <size>
{% if mongodb_cluster_enabled %}
# Replication Options
# in replicated mongo databases, specify the replica set name here
replSet=storagedev
replSet = {{ mongodb_replicaset }}
# maximum size in megabytes for replication operation log
#oplogSize=1024
# path to a key file storing authentication info for connections
# between replica set members
keyFile=/data/mongo_home/dev-d4science-keyfile
{% endif %}

View File

@ -22,6 +22,8 @@ redmine_glob_group: www-data
redmine_glob_users_home_base: /srv/redmine-home
# Plugins
rm_embedded_tabs_plugin: False
rm_recurring_tasks_plugin: False
redmine_install_agile_plugin: False
rm_scrum_plugin: False
rm_advanced_roadmap_plugin: False

View File

@ -67,31 +67,20 @@
- redmine
- redmine_plugins
# This one causes problems on redmine 2.5.2
# - name: Install the backlogs plugin
# git: repo=https://github.com/backlogs/redmine_backlogs.git dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_backlogs update=no
# notify:
# - Bundle install and reconfigure redmine
# - apache2 reload
# tags:
# - redmine
- name: Install the embedded tab plugin
git: repo=https://github.com/jamtur01/redmine_tab.git dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_tab update=no
notify:
- apache2 reload when needed
- Reload unicorn when needed
tags:
- redmine
- redmine_plugins
when: rm_embedded_tabs_plugin
tags: [ 'redmine', 'redmine_plugins', 'rm_embedded_tabs' ]
- name: Install the recurring-tasks plugin
git: repo=https://github.com/nutso/redmine-plugin-recurring-tasks.git dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/recurring_tasks update=no
notify:
- Bundle install and reconfigure redmine
tags:
- redmine
- redmine_plugins
when: rm_recurring_tasks_plugin
tags: [ 'redmine', 'redmine_plugins', 'rm_recurring_tasks' ]
- name: Redmine agile plugin. Free version from www.redminecrm.com
unarchive: src=redmine_agile.zip dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins creates={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_agile/init.rb
@ -136,32 +125,6 @@
- redmine_plugins
- redmine_plugins_ar
#- name: Get the scrum2b plugin
# get_url: url=https://github.com/scrum2b/scrum2b/archive/master.zip dest={{ redmine_glob_root_dir }}/plugins_download/scrum2b-2-1-stable.zip validate_certs=no
# when: rm_scrum2b_plugin
# tags:
# - redmine
# - redmine_plugins
# - redmine_plugins_scrum2b
#
#- name: Unarchive the scrum2b plugin
# unarchive: src={{ redmine_glob_root_dir }}/plugins_download/scrum2b-2-1-stable.zip dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins copy=no owner=root group=root creates={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/scrum2b/init.rb
# when: rm_scrum2b_plugin
# tags:
# - redmine
# - redmine_plugins
# - redmine_plugins_scrum2b
#
#- name: Rename the scrum plugin
# shell: mv "{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/scrum2b-master" {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/scrum2b creates={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/scrum2b/init.rb
# when: rm_scrum2b_plugin
# notify:
# - Bundle install and reconfigure redmine
# tags:
# - redmine
# - redmine_plugins
# - redmine_plugins_scrum2b
- name: Install the redmine scrum2b plugin
git: repo=https://github.com/scrum2b/scrum2b version=2-1-stable dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/scrum2b update=no
when: rm_scrum2b_plugin