diff --git a/.travis.yml b/.travis.yml index e2c64a8..2cd6ee4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,30 @@ env: DISTRIBUTION=ubuntu-upstart DIST_VERSION=14.04 MONGODB_VERSION=3.2 + - > + DISTRIBUTION=debian + DIST_VERSION=9-builded + MONGODB_VERSION=3.6 + - > + DISTRIBUTION=debian + DIST_VERSION=9-builded + MONGODB_VERSION=3.4 + - > + DISTRIBUTION=debian + DIST_VERSION=9-builded + MONGODB_VERSION=3.2 + - > + DISTRIBUTION=debian + DIST_VERSION=8-builded + MONGODB_VERSION=3.6 + - > + DISTRIBUTION=debian + DIST_VERSION=8-builded + MONGODB_VERSION=3.4 + - > + DISTRIBUTION=debian + DIST_VERSION=8-builded + MONGODB_VERSION=3.2 - > DISTRIBUTION=centos DIST_VERSION=6-builded diff --git a/tasks/main.yml b/tasks/main.yml index 77f8ae0..01bba78 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,10 +3,11 @@ - name: Include OS-specific variables include_vars: "{{ item }}" with_first_found: + - "{{ ansible_distribution_release }}.yml" - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" -- name: Include installation on Debian-based OS +- name: Include installation tasks include: "install.{{ ansible_os_family | lower }}.yml" tags: [mongodb] diff --git a/tests/Dockerfile.debian_8-builded b/tests/Dockerfile.debian_8-builded new file mode 100644 index 0000000..4055247 --- /dev/null +++ b/tests/Dockerfile.debian_8-builded @@ -0,0 +1,7 @@ +FROM debian:8 + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt update && \ + apt install --yes python-minimal && \ + rm /lib/systemd/system/getty@.service diff --git a/tests/Dockerfile.debian_9-builded b/tests/Dockerfile.debian_9-builded new file mode 100644 index 0000000..8397f5c --- /dev/null +++ b/tests/Dockerfile.debian_9-builded @@ -0,0 +1,31 @@ +FROM debian:9 + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt update && \ + apt install --yes python-minimal systemd gnupg + +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!' + +RUN ln -s /lib/systemd/systemd /sbin/init diff --git a/vars/stretch.yml b/vars/stretch.yml new file mode 100644 index 0000000..82f0479 --- /dev/null +++ b/vars/stretch.yml @@ -0,0 +1,3 @@ +--- + +mongodb_package: mongodb