mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +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:
|
package:
|
||||||
name:
|
name:
|
||||||
- mongodb-server
|
- mongodb-server
|
||||||
- mongodb
|
- mongodb # 2019-01-31: this package does not exist on (cannot be installed on) Debian 10, SEE #1437
|
||||||
state: present
|
state: present
|
||||||
when: internet_available
|
when: internet_available
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Create 3 dirs for MongoDB
|
- name: 'Create 3 dirs for MongoDB: /var/run/mongodb, {{ mongodb_db_path }}, /var/log/mongodb'
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
- { path: "{{ mongodb_db_path }}" } # == /library/dbdata/mongodb/
|
- { path: "{{ mongodb_db_path }}" } # == /library/dbdata/mongodb/
|
||||||
- { path: '/var/log/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:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
|
@ -26,16 +26,16 @@
|
||||||
group: root
|
group: root
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
with_items:
|
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: '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' }
|
- { 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?)
|
- name: Enable & Restart 'mongodb' systemd service if mongodb_enabled, incl daemon-reload (in case mongodb.service changed?)
|
||||||
systemd:
|
systemd:
|
||||||
name: mongodb
|
name: mongodb
|
||||||
|
daemon_reload: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon_reload: yes
|
|
||||||
when: mongodb_enabled
|
when: mongodb_enabled
|
||||||
|
|
||||||
- name: Disable 'mongodb' service, if not mongodb_enabled
|
- name: Disable 'mongodb' service, if not mongodb_enabled
|
||||||
|
|
Loading…
Reference in a new issue