Skip to content

Commit

Permalink
Merge pull request #121 from UnderGreen/ubuntu_1804
Browse files Browse the repository at this point in the history
Ubuntu 18.04 support
  • Loading branch information
UnderGreen authored Jul 14, 2018
2 parents ca9bc78 + 789c2b5 commit c0bc450
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ language: python
python:
- "2.7"
env:
- >
DISTRIBUTION=ubuntu
DIST_VERSION=18_04-builded
MONGODB_VERSION=3.6
MONGODB_PACKAGE=mongodb
- >
DISTRIBUTION=ubuntu
DIST_VERSION=16_04-builded
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ MongoDB support matrix:
| ------------ |:-------------:|:-----------:|:-----------:|:-----------:|
| Ubuntu 14.04 | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:|
| Ubuntu 16.04 | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:|
| Ubuntu 18.04 | :no_entry: | :x:| :x:| :white_check_mark:|
| Debian 8.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:|
| Debian 9.x | :no_entry: | :white_check_mark:| :x:| :white_check_mark:|
| RHEL 6.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark:|
Expand Down
8 changes: 7 additions & 1 deletion tasks/install.debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
when: (mongodb_package == 'mongodb-org' and
(mongodb_version is not defined
or mongodb_repository[mongodb_major_version] is not defined
or mongodb_version != "3.6") and ansible_distribution_release == "stretch")
or mongodb_version != '3.6') and ansible_distribution_release == 'stretch')

- name: Fail when used wrong mongodb_version variable with Ubuntu 18.04
fail:
msg: "mongodb_version variable should be '3.6' and mongodb_package should be 'mongodb' for Ubuntu 18.04"
when: ((mongodb_package == 'mongodb-org' or mongodb_version != '3.6')
and ansible_distribution_release == "bionic")

- name: Fail when used wrong mongodb_version variable
fail:
Expand Down
29 changes: 29 additions & 0 deletions tests/Dockerfile.ubuntu_18_04-builded
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM ubuntu:18.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt update && \
apt install --yes python-minimal systemd gnupg iproute2

RUN cd /lib/systemd/system/sysinit.target.wants/ && \
ls | grep -v systemd-tmpfiles-setup.service | xargs rm -f && \
rm -f /lib/systemd/system/sockets.target.wants/*udev* && \
systemctl mask -- \
tmp.mount \
etc-hostname.mount \
etc-hosts.mount \
etc-resolv.conf.mount \
-.mount \
swap.target \
getty.target \
getty-static.service \
dev-mqueue.mount \
cgproxy.service \
systemd-tmpfiles-setup-dev.service \
systemd-remount-fs.service \
systemd-ask-password-wall.path \
systemd-logind.service && \
systemctl set-default multi-user.target || true

RUN sed -ri /etc/systemd/journald.conf \
-e 's!^#?Storage=.*!Storage=volatile!'

0 comments on commit c0bc450

Please sign in to comment.