library/roles/mongodb-org/defaults/main.yml: /etc/default/mongod is now a template.

dnet-openaire/inventory/hosts: node7.t.openaire is not used anymore.
dnet-openaire/inventory/hosts.stdl: The project ended.
This commit is contained in:
Andrea Dell'Amico 2016-03-24 15:41:14 +01:00
parent 04c07fa3a4
commit 3428052604
6 changed files with 17 additions and 97 deletions

View File

@ -8,18 +8,18 @@
- name: Add all the users to the dnet group - name: Add all the users to the dnet group
user: name={{ item.login }} groups={{ dnet_group }}, append=yes user: name={{ item.login }} groups={{ dnet_group }}, append=yes
with_items: users_system_users with_items: '{{ users_system_users | default([]) }}'
tags: [ 'dnet', 'users' ] tags: [ 'dnet', 'users' ]
- name: Add selected users to the dnet sudoers group - name: Add selected users to the dnet sudoers group
user: name={{ item.login }} groups={{ dnet_sudoers_group }}, append=yes user: name={{ item.login }} groups={{ dnet_sudoers_group }}, append=yes
with_items: users_system_users with_items: '{{ users_system_users | default([]) }}'
when: item.dnet_sudoers_user when: item.dnet_sudoers_user
tags: [ 'dnet', 'users' ] tags: [ 'dnet', 'users' ]
- name: Remove selected users to the dnet sudoers group - name: Remove selected users to the dnet sudoers group
user: name={{ item.login }} groups={{ dnet_group }} user: name={{ item.login }} groups={{ dnet_group }}
with_items: users_system_users with_items: '{{ users_system_users | default([]) }}'
when: not item.dnet_sudoers_user when: not item.dnet_sudoers_user
tags: [ 'dnet', 'users' ] tags: [ 'dnet', 'users' ]

View File

@ -11,11 +11,14 @@ mongodb_http_port: 28017
mongodb_user: mongodb mongodb_user: mongodb
mongodb_group: mongodb mongodb_group: mongodb
mongodb_logdir: /var/log/mongodb mongodb_logdir: /var/log/mongodb
mongodb_log_file: mongodb.log mongodb_log_file: mongod.log
mongodb_logpath: '{{ mongodb_logdir }}/{{ mongodb_log_file }}' mongodb_logpath: '{{ mongodb_logdir }}/{{ mongodb_log_file }}'
mongodb_dbpath: /var/lib/mongodb mongodb_dbpath: /var/lib/mongodb
mongodb_log_retain_days: 7 mongodb_log_retain_days: 7
mongodb_directoryperdb: False mongodb_directoryperdb: False
mongodb_conf_file: /etc/mongod.conf
mongodb_daemon: /usr/bin/mongod
mongod_additional_options: ""
mongodb_allowed_hosts: mongodb_allowed_hosts:
- 127.0.0.1/8 - 127.0.0.1/8
- '{{ ansible_default_ipv4.address }}/32' - '{{ ansible_default_ipv4.address }}/32'

View File

@ -1,7 +1,4 @@
--- ---
- name: Update apt cache
apt: update_cache=yes
ignore_errors: true
- name: Restart mongodb - name: Restart mongodb
service: name=mongodb state=restarted service: name=mongod state=restarted
when: "'{{ mongodb_start_server }}' == 'yes'"

View File

@ -21,7 +21,7 @@
tags: mongodb tags: mongodb
- name: Install the mongodb defaults file - name: Install the mongodb defaults file
copy: content="ENABLE_MONGODB={{ mongodb_start_server }}" dest=/etc/default/mongodb owner=root group=root mode=0444 template: src=mongod-default.j2 dest=/etc/default/mongod owner=root group=root mode=0444
when: mongodb_install_conf when: mongodb_install_conf
tags: mongodb tags: mongodb
@ -38,6 +38,7 @@
- name: Install the mongodb 2.6 configuration - name: Install the mongodb 2.6 configuration
template: src=mongod-2.6.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0444 template: src=mongod-2.6.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0444
when: mongodb_install_conf when: mongodb_install_conf
notify: Restart mongodb
tags: mongodb tags: mongodb
- name: Install the cron job that manages log files rotation - name: Install the cron job that manages log files rotation

View File

@ -0,0 +1,6 @@
ENABLE_MONGOD="{{ mongodb_start_server }}"
CONF={{ mongodb_conf_file }}
DAEMON={{ mongodb_daemon }}
DAEMONUSER={{ mongodb_user }}
DAEMON_OPTS="{{ mongod_additional_options }} --config $CONF"

View File

@ -1,87 +0,0 @@
# 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={{ mongodb_dbpath }}
directoryperdb={{ mongodb_directoryperdb }}
#where to log
logpath={{ mongodb_logpath }}
logappend=true
port = {{ mongodb_tcp_port }}
# Disables write-ahead journaling
# nojournal = true
# Enables periodic logging of CPU utilization and I/O wait
#cpu = true
# Turn on/off security. Off is currently the default
#noauth = true
#auth = true
# Verbose logging output.
#verbose = true
# Inspect all client data for validity on receipt (useful for
# developing drivers)
#objcheck = true
# Enable db quota management
#quota = true
# Set oplogging level where n is
# 0=off (default)
# 1=W
# 2=R
# 3=both
# 7=W+some reads
#diaglog = 0
# Ignore query hints
#nohints = 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
#noscripting = true
# Turns off table scans. Any query that would do a table scan fails.
#notablescan = true
# Disable data file preallocation.
#noprealloc = true
# Specify .ns file size for new databases.
# nssize = <size>
# Accout token for Mongo monitoring server.
#mms-token = <token>
# Server name for Mongo monitoring server.
#mms-name = <server-name>
# Ping interval for Mongo monitoring server.
#mms-interval = <seconds>
# Replication Options
# in master/slave replicated mongo databases, specify here whether
# this is a slave or master
#slave = true
#source = master.example.com
# Slave only: specify a single database to replicate
#only = master.example.com
# or
#master = true
#source = slave.example.com
{% if mongodb_cluster_enabled %}
# in replica set configuration, specify the name of the replica set
replSet = {{ mongodb_replicaset }}
{% endif %}