forked from ISTI-ansible-roles/ansible-roles
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:
parent
86df770466
commit
f73e24e32b
|
@ -2,7 +2,8 @@
|
||||||
mongodb_install_from_external_repo: True
|
mongodb_install_from_external_repo: True
|
||||||
mongodb_install_packages: True
|
mongodb_install_packages: True
|
||||||
mongodb_install_conf: 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_start_server: 'no'
|
||||||
mongodb_tcp_port: 27017
|
mongodb_tcp_port: 27017
|
||||||
mongodb_http_interface: False
|
mongodb_http_interface: False
|
||||||
|
@ -21,3 +22,4 @@ mongodb_allowed_hosts:
|
||||||
|
|
||||||
mongodb_cluster_enabled: False
|
mongodb_cluster_enabled: False
|
||||||
mongodb_replicaset: storagedev
|
mongodb_replicaset: storagedev
|
||||||
|
mongodb_replica_keyfile: '{{ mongodb_dbpath }}/replica_keyfile'
|
||||||
|
|
|
@ -11,20 +11,13 @@
|
||||||
register: external_repo
|
register: external_repo
|
||||||
tags: mongodb
|
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
|
- 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:
|
with_items:
|
||||||
- mongodb-org
|
- mongodb-org
|
||||||
when:
|
when:
|
||||||
- mongodb_install_from_external_repo
|
- mongodb_install_from_external_repo
|
||||||
- mongodb_install_packages
|
- mongodb_install_packages
|
||||||
- mongodb_latest_version
|
|
||||||
tags: mongodb
|
tags: mongodb
|
||||||
|
|
||||||
- name: Install the mongodb defaults file
|
- name: Install the mongodb defaults file
|
||||||
|
@ -49,7 +42,7 @@
|
||||||
|
|
||||||
- name: Install the cron job that manages log files rotation
|
- 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
|
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
|
- name: Ensure mongodb is started
|
||||||
service: name=mongod state=started enabled=yes
|
service: name=mongod state=started enabled=yes
|
||||||
|
|
|
@ -5,14 +5,15 @@
|
||||||
# Note: if you run mongodb as a non-root user (recommended) you may
|
# Note: if you run mongodb as a non-root user (recommended) you may
|
||||||
# need to create and set permissions for this directory manually,
|
# need to create and set permissions for this directory manually,
|
||||||
# e.g., if the parent directory isn't mutable by the mongodb user.
|
# 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
|
#where to log
|
||||||
logpath=/data/mongo_log.txt
|
logpath={{ mongodb_logpath }}
|
||||||
|
|
||||||
logappend=true
|
logappend=true
|
||||||
|
|
||||||
port = 27017
|
port = {{ mongodb_tcp_port }}
|
||||||
|
|
||||||
# Listen to local interface only. Comment out to listen on all interfaces.
|
# Listen to local interface only. Comment out to listen on all interfaces.
|
||||||
#bind_ip = 127.0.0.1
|
#bind_ip = 127.0.0.1
|
||||||
|
@ -48,8 +49,11 @@ port = 27017
|
||||||
# Ignore query hints
|
# Ignore query hints
|
||||||
#nohints = true
|
#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
|
# Turns off server-side scripting. This will result in greatly limited
|
||||||
# functionality
|
# functionality
|
||||||
|
@ -64,12 +68,15 @@ port = 27017
|
||||||
# Specify .ns file size for new databases.
|
# Specify .ns file size for new databases.
|
||||||
# nssize = <size>
|
# nssize = <size>
|
||||||
|
|
||||||
|
{% if mongodb_cluster_enabled %}
|
||||||
# Replication Options
|
# Replication Options
|
||||||
|
|
||||||
# in replicated mongo databases, specify the replica set name here
|
# in replicated mongo databases, specify the replica set name here
|
||||||
replSet=storagedev
|
replSet = {{ mongodb_replicaset }}
|
||||||
# maximum size in megabytes for replication operation log
|
# maximum size in megabytes for replication operation log
|
||||||
#oplogSize=1024
|
#oplogSize=1024
|
||||||
# path to a key file storing authentication info for connections
|
# path to a key file storing authentication info for connections
|
||||||
# between replica set members
|
# between replica set members
|
||||||
keyFile=/data/mongo_home/dev-d4science-keyfile
|
keyFile=/data/mongo_home/dev-d4science-keyfile
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ redmine_glob_group: www-data
|
||||||
redmine_glob_users_home_base: /srv/redmine-home
|
redmine_glob_users_home_base: /srv/redmine-home
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
|
rm_embedded_tabs_plugin: False
|
||||||
|
rm_recurring_tasks_plugin: False
|
||||||
redmine_install_agile_plugin: False
|
redmine_install_agile_plugin: False
|
||||||
rm_scrum_plugin: False
|
rm_scrum_plugin: False
|
||||||
rm_advanced_roadmap_plugin: False
|
rm_advanced_roadmap_plugin: False
|
||||||
|
|
|
@ -67,31 +67,20 @@
|
||||||
- redmine
|
- redmine
|
||||||
- redmine_plugins
|
- 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
|
- 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
|
git: repo=https://github.com/jamtur01/redmine_tab.git dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_tab update=no
|
||||||
notify:
|
notify:
|
||||||
- apache2 reload when needed
|
- apache2 reload when needed
|
||||||
- Reload unicorn when needed
|
- Reload unicorn when needed
|
||||||
tags:
|
when: rm_embedded_tabs_plugin
|
||||||
- redmine
|
tags: [ 'redmine', 'redmine_plugins', 'rm_embedded_tabs' ]
|
||||||
- redmine_plugins
|
|
||||||
|
|
||||||
- name: Install the recurring-tasks plugin
|
- 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
|
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:
|
notify:
|
||||||
- Bundle install and reconfigure redmine
|
- Bundle install and reconfigure redmine
|
||||||
tags:
|
when: rm_recurring_tasks_plugin
|
||||||
- redmine
|
tags: [ 'redmine', 'redmine_plugins', 'rm_recurring_tasks' ]
|
||||||
- redmine_plugins
|
|
||||||
|
|
||||||
- name: Redmine agile plugin. Free version from www.redminecrm.com
|
- 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
|
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
|
||||||
- redmine_plugins_ar
|
- 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
|
- 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
|
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
|
when: rm_scrum2b_plugin
|
||||||
|
|
Loading…
Reference in New Issue