ansible-role-mongodb/tasks
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
..
auth_initialization.yml Merged backup user creating 2016-04-18 19:08:24 +06:00
configure.yml Ensure service is started 2016-05-09 22:06:37 +02:00
install.deb.yml Fix systemd test for Ubuntu Xenial 2016-09-21 16:33:05 +02:00
main.yml added 'always_run=yes' for two script tasks otherwise preventing check_mode to run through 2016-07-15 15:57:06 +02:00
mms-agent.yml Support of mongodb 3 2016-04-17 19:43:00 +06:00
replication.yml Support of mongodb 3 2016-04-17 19:43:00 +06:00
replication_init_auth.yml Support of mongodb 3 2016-04-17 19:43:00 +06:00