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:
parent
4fa7350079
commit
77044a2570
1 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
- name: Install packages mongodb-server and mongodb
|
- name: 'Install packages: mongodb, mongodb-server'
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- mongodb-server
|
- mongodb-server
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Create the data directory for MongoDB
|
- name: Create 3 dirs for 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
|
- name: Populate & position /etc/mongod.conf, mongodb.service, /usr/bin/iiab-mongodb-repair-if-no-lock
|
||||||
template:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
- { 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 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:
|
systemd:
|
||||||
name: mongodb
|
name: mongodb
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
@ -38,16 +38,16 @@
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
when: mongodb_enabled
|
when: mongodb_enabled
|
||||||
|
|
||||||
- name: 'Disable+stop systemd service if mongodb_enabled: False'
|
- name: Disable 'mongodb' service, if not mongodb_enabled
|
||||||
systemd:
|
systemd:
|
||||||
name: mongodb
|
name: mongodb
|
||||||
enabled: no
|
enabled: no
|
||||||
state: stopped
|
state: stopped
|
||||||
when: not mongodb_enabled
|
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:
|
ini_file:
|
||||||
dest: "{{ iiab_ini_file }}"
|
path: "{{ iiab_ini_file }}"
|
||||||
section: mongodb
|
section: mongodb
|
||||||
option: "{{ item.option }}"
|
option: "{{ item.option }}"
|
||||||
value: "{{ item.value }}"
|
value: "{{ item.value }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue