1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

Update main.yml

This commit is contained in:
A Holt 2019-01-31 11:07:12 -05:00 committed by GitHub
parent 463bb62d6c
commit fde9cbbb49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,13 +2,13 @@
package:
name:
- mongodb-server
- mongodb
- mongodb # 2019-01-31: this package does not exist on (cannot be installed on) Debian 10, SEE #1437
state: present
when: internet_available
tags:
- download
- name: Create 3 dirs for MongoDB
- name: 'Create 3 dirs for MongoDB: /var/run/mongodb, {{ mongodb_db_path }}, /var/log/mongodb'
file:
state: directory
path: "{{ item.path }}"
@ -18,7 +18,7 @@
- { path: "{{ mongodb_db_path }}" } # == /library/dbdata/mongodb/
- { path: '/var/log/mongodb' }
- name: Populate & position /etc/mongod.conf, mongodb.service, /usr/bin/iiab-mongodb-repair-if-no-lock
- name: Install /etc/mongod.conf, mongodb.service, /usr/bin/iiab-mongodb-repair-if-no-lock from templates
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
@ -26,16 +26,16 @@
group: root
mode: "{{ item.mode }}"
with_items:
- { src: 'mongod.conf.j2', dest: "{{ mongodb_conf }}", mode: '0644' }
- { src: 'mongod.conf.j2', dest: "{{ mongodb_conf }}", mode: '0644' } # /etc/mongod.conf
- { src: 'mongodb.service.j2', dest: '/etc/systemd/system/mongodb.service', mode: '0644' }
- { src: 'iiab-mongodb-repair-if-no-lock.j2', dest: '/usr/bin/iiab-mongodb-repair-if-no-lock', mode: '0755' }
- name: Enable & Restart 'mongodb' systemd service if mongodb_enabled, incl daemon-reload (in case mongodb.service changed?)
systemd:
name: mongodb
daemon_reload: yes
enabled: yes
state: restarted
daemon_reload: yes
when: mongodb_enabled
- name: Disable 'mongodb' service, if not mongodb_enabled