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:
parent
463bb62d6c
commit
fde9cbbb49
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue