Skip to content

Commit c0bc450

Browse files
authored
Merge pull request #121 from UnderGreen/ubuntu_1804
Ubuntu 18.04 support
2 parents ca9bc78 + 789c2b5 commit c0bc450

4 files changed

Lines changed: 42 additions & 1 deletion

File tree

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ language: python
77
python:
88
- "2.7"
99
env:
10+
- >
11+
DISTRIBUTION=ubuntu
12+
DIST_VERSION=18_04-builded
13+
MONGODB_VERSION=3.6
14+
MONGODB_PACKAGE=mongodb
1015
- >
1116
DISTRIBUTION=ubuntu
1217
DIST_VERSION=16_04-builded

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ MongoDB support matrix:
1414
| ------------ |:-------------:|:-----------:|:-----------:|:-----------:|
1515
| Ubuntu 14.04 | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:|
1616
| Ubuntu 16.04 | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:|
17+
| Ubuntu 18.04 | :no_entry: | :x:| :x:| :white_check_mark:|
1718
| Debian 8.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:|
1819
| Debian 9.x | :no_entry: | :white_check_mark:| :x:| :white_check_mark:|
1920
| RHEL 6.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark:|

tasks/install.debian.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@
2323
when: (mongodb_package == 'mongodb-org' and
2424
(mongodb_version is not defined
2525
or mongodb_repository[mongodb_major_version] is not defined
26-
or mongodb_version != "3.6") and ansible_distribution_release == "stretch")
26+
or mongodb_version != '3.6') and ansible_distribution_release == 'stretch')
27+
28+
- name: Fail when used wrong mongodb_version variable with Ubuntu 18.04
29+
fail:
30+
msg: "mongodb_version variable should be '3.6' and mongodb_package should be 'mongodb' for Ubuntu 18.04"
31+
when: ((mongodb_package == 'mongodb-org' or mongodb_version != '3.6')
32+
and ansible_distribution_release == "bionic")
2733

2834
- name: Fail when used wrong mongodb_version variable
2935
fail:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM ubuntu:18.04
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt update && \
6+
apt install --yes python-minimal systemd gnupg iproute2
7+
8+
RUN cd /lib/systemd/system/sysinit.target.wants/ && \
9+
ls | grep -v systemd-tmpfiles-setup.service | xargs rm -f && \
10+
rm -f /lib/systemd/system/sockets.target.wants/*udev* && \
11+
systemctl mask -- \
12+
tmp.mount \
13+
etc-hostname.mount \
14+
etc-hosts.mount \
15+
etc-resolv.conf.mount \
16+
-.mount \
17+
swap.target \
18+
getty.target \
19+
getty-static.service \
20+
dev-mqueue.mount \
21+
cgproxy.service \
22+
systemd-tmpfiles-setup-dev.service \
23+
systemd-remount-fs.service \
24+
systemd-ask-password-wall.path \
25+
systemd-logind.service && \
26+
systemctl set-default multi-user.target || true
27+
28+
RUN sed -ri /etc/systemd/journald.conf \
29+
-e 's!^#?Storage=.*!Storage=volatile!'

0 commit comments

Comments
 (0)