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 2019-02-02 13:48:50 -05:00 committed by GitHub
parent 874182f2f4
commit e473f3af8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,25 +26,25 @@
state: directory
when: internet_available and is_rpi
- name: Download & unzip MongoDB 3.0.14's 3 CORE binaries to /tmp/mongodb-3.0.1x (rpi)
- name: Download & unzip http://download.iiab.io/packages/mongodb_stretch_3_0_14_core.zip to /tmp/mongodb-3.0.1x (rpi)
unarchive:
remote_src: yes
src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_core.zip"
dest: /tmp/mongodb-3.0.1x
when: internet_available and is_rpi
- name: Install (move) 3 binaries from /tmp/mongodb-3.0.1x/core to /usr/bin (rpi)
- name: Install (move) its 3 CORE binaries from /tmp/mongodb-3.0.1x/core to /usr/bin (rpi)
shell: mv /tmp/mongodb-3.0.1x/core/* /usr/bin
when: internet_available and is_rpi
- name: Download & unzip MongoDB 3.0.15's 9 TOOLS binaries to /tmp/mongodb-3.0.1x (rpi)
- name: Download & unzip http://download.iiab.io/packages/mongodb_stretch_3_0_14_tools.zip [IN FACT THIS ONE'S 3.0.15] to /tmp/mongodb-3.0.1x (rpi)
unarchive:
remote_src: yes
src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_tools.zip"
dest: /tmp/mongodb-3.0.1x
when: internet_available and is_rpi
- name: Install (move) 9 binaries from /opt/iiab/downloads/mongodb-3.0.1x/tools to /usr/bin (rpi)
- name: Install (move) its 9 TOOLS binaries from /opt/iiab/downloads/mongodb-3.0.1x/tools to /usr/bin (rpi)
shell: mv /tmp/mongodb-3.0.1x/tools/* /usr/bin
when: internet_available and is_rpi
@ -86,6 +86,14 @@
# - "{{ downloads_dir }}/mongodb-3.0.1x/tools/*"
# when: internet_available and is_rpi
- name: Create Linux user mongodb (rpi)
user:
name: mongodb
home: /var/lib/mongodb
shell: /usr/sbin/nologin
when: is_rpi
# 2. CONFIGURE FOR IIAB
- name: 'Create 3 dirs for MongoDB: /var/run/mongodb, {{ mongodb_db_path }}, /var/log/mongodb'
@ -110,6 +118,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' }
# 3. ENABLE/DISABLE
- name: Enable & Restart 'mongodb' systemd service if mongodb_enabled, incl daemon-reload (in case mongodb.service changed?)
@ -127,6 +136,7 @@
state: stopped
when: not mongodb_enabled
# 4. DOCUMENT IN /etc/iiab/iiab.ini
- name: Add 'mongodb' variable values to {{ iiab_ini_file }}