1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Update main.yml

This commit is contained in:
A Holt 2018-10-31 02:51:34 -04:00 committed by GitHub
parent 4fa7350079
commit 77044a2570
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
- name: Install packages mongodb-server and mongodb
- name: 'Install packages: mongodb, mongodb-server'
package:
name:
- mongodb-server
@ -8,7 +8,7 @@
tags:
- download
- name: Create the data directory for MongoDB
- name: Create 3 dirs for 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
- name: Populate & position /etc/mongod.conf, mongodb.service, /usr/bin/iiab-mongodb-repair-if-no-lock
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
@ -30,7 +30,7 @@
- { 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 systemd service if mongodb_enabled, with "systemctl 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:
name: mongodb
enabled: yes
@ -38,16 +38,16 @@
daemon_reload: yes
when: mongodb_enabled
- name: 'Disable+stop systemd service if mongodb_enabled: False'
- name: Disable 'mongodb' service, if not mongodb_enabled
systemd:
name: mongodb
enabled: no
state: stopped
when: not mongodb_enabled
- name: Add 'mongodb' to list of services at {{ iiab_ini_file }}
- name: Add 'mongodb' variable values to {{ iiab_ini_file }}
ini_file:
dest: "{{ iiab_ini_file }}"
path: "{{ iiab_ini_file }}"
section: mongodb
option: "{{ item.option }}"
value: "{{ item.value }}"