Commit Graph

26 Commits

Author SHA1 Message Date
David Castellanos d9393b1b66 Fix systemd test for Ubuntu Xenial
The role checks if the system is running or not systemd. It checks the
name of the process with PID1, and if it contains the string "systemd"
assumes that the host is systemd-based. Unfortunately that check fails
in Ubuntu Xenial:

  vagrant@mongo-xenial:~$ cat /proc/1/cmdline
  /sbin/init

A better approach may be to check if /sbin/init is a symlink or a
binary. In systemd-based systems (e.g. Ubuntu Xenial), /sbin/init is a
symlink to the systemd binary:

  vagrant@mongo-xenial:~$ file /sbin/init
  /sbin/init: symbolic link to /lib/systemd/systemd

In Ubuntu Trusty /sbin/init is a binary:

  vagrant@mongo-trusty:~$ file /sbin/init
  /sbin/init: ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV),
  dynamically linked (uses shared libs), for GNU/Linux 2.6.24,
  BuildID[sha1]=7a4c688d009fc1f06ffc692f5f42ab09e68582b2, strippe

This commit attempts to solve the problem described above. The systemd
check has been rewritten to check if /sbin/init is a binary or a
symlink.
2016-09-21 16:33:05 +02:00
Sebastian Maier b949a5e6dd added 'always_run=yes' for two script tasks otherwise preventing check_mode to run through 2016-07-15 15:57:06 +02:00
Daniel White a0ce9baaac Ensure dbpath directory has configurable owner
Looks like when this variable was introduced, this particular task was
missed.

This has also been moved to the configuration stage, since it seems to
fit with the task for ensuring the log directory exists, too.
2016-04-27 14:14:55 +10:00
Sergei Antipov 25c7cec6f2 Support of mongodb 3 2016-04-17 19:43:00 +06:00
Sergei Antipov 3dfa06c44f Added feature to use mongodb versions >= 3.0 2016-03-04 01:20:08 +06:00
Sergei Antipov b22dcbdd28 Fixed problem with pip 2015-11-17 12:02:33 +06:00
Sergei Antipov 9b108da9f5 Added version for pymongo 2015-11-17 11:56:02 +06:00
Adam Snodgrass d21e963a27 Use mongodb_conf_dbpath rather than a hard-coded path name 2015-11-17 11:56:02 +06:00
Dariusz Luksza fbd30315e4 Move /data ensuring task after package install 2015-11-17 11:56:02 +06:00
Dariusz Luksza 53041f47d0 Fix typo 2015-11-17 11:56:01 +06:00
James Yang d88e811ad4 parameterize apt key and apt repo variables
remove when conditional
2015-11-17 11:56:01 +06:00
Dariusz Łuksza 183e6d485f Ensure /data/db directory on debina
It appears that standard mongo install process on debian doesn't create the /data/db directory. This prevents mongo process from starting and required manual job on the server.

With this fix the /data/db directory will be created by ansible during install process.
2015-11-17 11:56:01 +06:00
Deimosfr 04ecae0cc6 Adding numactl package
More and more physical servers are running on numa infrastructure. To
get best performances, numactl is required.
2015-06-26 18:56:32 +02:00
Sergei Antipov 9442794314 Global refactoring of authorization and replication 2015-06-22 14:59:25 +06:00
Sergei Antipov 11c4200f5e Added changed_when for several tasks 2015-06-16 14:19:58 +06:00
Oleg Vivtash 6309afc1cf Update install.deb.yml 2015-04-06 19:51:47 +03:00
Oleg Vivtash 4fa70d3dab Ability to install PyMongo from PIP 2015-04-06 19:38:52 +03:00
deimosfr bc790326ab fixing systemd issue
Updating systemd detection by getting PID 1 command line instead of
checking systemd folder. This to avoid issues with Docker for example.
2015-03-04 11:05:08 +01:00
deimosfr 45508b9f99 fix regression on non systemd debian 2015-02-26 15:11:22 +01:00
deimosfr edd9915a1a fixing service fail with systemd 2015-02-25 15:45:47 +01:00
Kirill Klenov 862a633425 Better handle mongodb-org 2015-01-23 12:43:36 +03:00
Guillaume Dedrie 538813020d Missing when statement preventing MongoDB repository to be added 2015-01-09 00:06:13 +01:00
Kirill Klenov f11f7886f7 Change behaviour 2015-01-07 14:43:05 +03:00
Guillaume Dedrie 8769e8a411 Add possibility for User to install from Official Debian or Ubuntu Repo.
Support new variable and due to difference between Debian/Ubuntu repo and MongoDB, daemon and file convention naming are differents.
2015-01-05 14:42:40 +01:00
Guillaume Dedrie d05268e601 Support Debian machine using MongoDB official repository for Debian 2014-08-25 16:14:41 +02:00
Kirill Klenov 1c29f2b317 Init role. 2014-06-04 19:03:58 +04:00