Skip to content

Commit

Permalink
Merge pull request #28 from danlamanna/add-ubuntu-16-04-support
Browse files Browse the repository at this point in the history
Add systemd unit for 16.04
  • Loading branch information
klen authored Sep 13, 2016
2 parents e7084a5 + cac9cb6 commit 0426b79
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions files/mongod.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target
4 changes: 4 additions & 0 deletions tasks/install.xenial.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: install systemd service
copy:
src=mongod.service
dest=/etc/systemd/system/mongod.service
3 changes: 3 additions & 0 deletions tasks/mongodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
- include: install.deb.yml
when: ansible_os_family == 'Debian' and mongodb_install

- include: install.xenial.yml
when: ansible_os_family == 'Debian' and ansible_distribution_release == 'xenial'

- include: configure.yml
when: mongodb_install

Expand Down

0 comments on commit 0426b79

Please sign in to comment.