From 41cebca12f0a985fc47cf8ee964e27033e29b373 Mon Sep 17 00:00:00 2001 From: Lossos <1607884+lossos@users.noreply.github.com> Date: Fri, 5 Jun 2020 10:00:04 +0200 Subject: [PATCH 1/5] Add Ansible and YAML Lint Config File --- .ansible-lint | 6 ++++++ .yamllint | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 .ansible-lint create mode 100644 .yamllint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..cc96ce2 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,6 @@ +exclude_paths: [] +parseable: true +quiet: true +skip_list: [305] +use_default_rules: true +verbosity: 1 diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..9097e58 --- /dev/null +++ b/.yamllint @@ -0,0 +1,6 @@ +--- +extends: default +rules: + line-length: + max: 120 + level: warning \ No newline at end of file From 2e0927b1f3585806620fded54779b2d94902ffec Mon Sep 17 00:00:00 2001 From: Lossos <1607884+lossos@users.noreply.github.com> Date: Fri, 5 Jun 2020 10:02:26 +0200 Subject: [PATCH 2/5] Add new Docker Files for Travis Testing --- tests/Dockerfile.centos-7 | 44 +++++++------- tests/Dockerfile.debian-8 | 49 --------------- tests/Dockerfile.debian-buster | 20 ++++++ tests/Dockerfile.debian-jessie | 18 ++++++ tests/Dockerfile.debian-stretch | 19 ++++++ tests/Dockerfile.ubuntu-14.04 | 22 +++---- tests/Dockerfile.ubuntu-16.04 | 104 ++++++++++++++++---------------- tests/Dockerfile.ubuntu-18.04 | 90 ++++++++++++--------------- 8 files changed, 182 insertions(+), 184 deletions(-) delete mode 100644 tests/Dockerfile.debian-8 create mode 100644 tests/Dockerfile.debian-buster create mode 100644 tests/Dockerfile.debian-jessie create mode 100644 tests/Dockerfile.debian-stretch diff --git a/tests/Dockerfile.centos-7 b/tests/Dockerfile.centos-7 index a36fae9..09f5ee9 100644 --- a/tests/Dockerfile.centos-7 +++ b/tests/Dockerfile.centos-7 @@ -1,22 +1,22 @@ -FROM centos:7 -# Install systemd -- See https://hub.docker.com/_/centos/ -RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs -RUN yum -y update; \ -(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ -rm -f /lib/systemd/system/multi-user.target.wants/*; \ -rm -f /etc/systemd/system/*.wants/*; \ -rm -f /lib/systemd/system/local-fs.target.wants/*; \ -rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ -rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ -rm -f /lib/systemd/system/basic.target.wants/*; \ -rm -f /lib/systemd/system/anaconda.target.wants/*; -# Install Ansible -RUN yum -y install epel-release -RUN yum -y install git ansible sudo -RUN yum clean all -# Disable requiretty -RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers -# Install Ansible inventory file -RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts -VOLUME [ "/sys/fs/cgroup" ] -CMD ["/usr/sbin/init"] +FROM centos:7 +# Install systemd -- See https://hub.docker.com/_/centos/ +RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs +RUN yum -y update; \ +(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ +rm -f /lib/systemd/system/multi-user.target.wants/*; \ +rm -f /etc/systemd/system/*.wants/*; \ +rm -f /lib/systemd/system/local-fs.target.wants/*; \ +rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ +rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ +rm -f /lib/systemd/system/basic.target.wants/*; \ +rm -f /lib/systemd/system/anaconda.target.wants/*; +# Install Ansible +RUN yum -y install epel-release +RUN yum -y install git ansible sudo +RUN yum clean all +# Disable requiretty +RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers +# Install Ansible inventory file +RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts +VOLUME [ "/sys/fs/cgroup" ] +CMD ["/usr/sbin/init"] diff --git a/tests/Dockerfile.debian-8 b/tests/Dockerfile.debian-8 deleted file mode 100644 index f95f1f9..0000000 --- a/tests/Dockerfile.debian-8 +++ /dev/null @@ -1,49 +0,0 @@ -# Dockerfile.ubuntu -FROM debian:8 - -RUN systemctl mask -- \ - -.mount \ - dev-mqueue.mount \ - dev-hugepages.mount \ - etc-hosts.mount \ - etc-hostname.mount \ - etc-resolv.conf.mount \ - proc-bus.mount \ - proc-irq.mount \ - proc-kcore.mount \ - proc-sys-fs-binfmt_misc.mount \ - proc-sysrq\\\\x2dtrigger.mount \ - sys-fs-fuse-connections.mount \ - sys-kernel-config.mount \ - sys-kernel-debug.mount \ - tmp.mount \ - \ - && systemctl mask -- \ - console-getty.service \ - display-manager.service \ - getty-static.service \ - getty\@tty1.service \ - hwclock-save.service \ - ondemand.service \ - systemd-logind.service \ - systemd-remount-fs.service \ - \ - && ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target \ - \ -&& ln -sf /lib/systemd/system/halt.target /etc/systemd/system/sigpwr.target - -RUN apt-get update -qq -y -RUN apt-get install -qq -y git python-pip python-dev libssl-dev \ - libffi-dev rsyslog systemd systemd-cron sudo - -# Install Ansible -RUN sed -i 's/^\($ModLoad imklog\)/#\1/' /etc/rsyslog.conf -RUN pip install --upgrade ansible -# Install Ansible inventory file -# RUN mkdir -p /etc/ansible # Not really sure why this won't run but it doesn't -RUN bash -c 'mkdir -p /etc/ansible' -RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts - -VOLUME ["/sys/fs/cgroup"] -VOLUME ["/run"] -CMD ["/sbin/init"] diff --git a/tests/Dockerfile.debian-buster b/tests/Dockerfile.debian-buster new file mode 100644 index 0000000..1217ba6 --- /dev/null +++ b/tests/Dockerfile.debian-buster @@ -0,0 +1,20 @@ +FROM debian:buster + +ENV pip_packages "ansible cryptography" + +# Install dependencies. +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + sudo systemd systemd-sysv \ + build-essential wget libffi-dev libssl-dev \ + python3-pip python3-dev python3-setuptools python3-wheel \ + && rm -rf /var/lib/apt/lists/* \ + && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \ + && apt-get clean + +# Install Ansible via pip. +RUN pip3 install $pip_packages + +RUN mkdir -p /etc/ansible && echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts + +ENTRYPOINT ["/bin/systemd"] \ No newline at end of file diff --git a/tests/Dockerfile.debian-jessie b/tests/Dockerfile.debian-jessie new file mode 100644 index 0000000..c0460ae --- /dev/null +++ b/tests/Dockerfile.debian-jessie @@ -0,0 +1,18 @@ +FROM debian:jessie + +RUN apt-get update -y && apt-get install -y --no-install-recommends \ + software-properties-common \ + build-essential \ + libffi-dev \ + libssl-dev \ + python-dev \ + python-pip \ + python-yaml \ + git \ + && rm -rf /var/lib/apt/lists/* + +RUN pip install cryptography --upgrade && pip install ansible + +RUN mkdir -p /etc/ansible && echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts + +ENTRYPOINT ["/sbin/init"] \ No newline at end of file diff --git a/tests/Dockerfile.debian-stretch b/tests/Dockerfile.debian-stretch new file mode 100644 index 0000000..d54c41d --- /dev/null +++ b/tests/Dockerfile.debian-stretch @@ -0,0 +1,19 @@ +FROM debian:stretch + +RUN apt-get update -y && apt-get install -y --no-install-recommends \ + software-properties-common \ + build-essential \ + libffi-dev \ + libssl-dev \ + python-dev \ + python-pip \ + python-yaml \ + git \ + systemd \ + && rm -rf /var/lib/apt/lists/* + +RUN pip install --upgrade setuptools && pip install ansible + +RUN mkdir -p /etc/ansible && echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts + +ENTRYPOINT ["/bin/systemd"] \ No newline at end of file diff --git a/tests/Dockerfile.ubuntu-14.04 b/tests/Dockerfile.ubuntu-14.04 index 9763b0e..45450ee 100644 --- a/tests/Dockerfile.ubuntu-14.04 +++ b/tests/Dockerfile.ubuntu-14.04 @@ -1,11 +1,11 @@ -# Dockerfile.ubuntu -FROM ubuntu-upstart:14.04 -# Install Ansible -#RUN mv /sbin/initctl.distrib /sbin/initctl -RUN apt-get update -y -RUN apt-get install -y python-software-properties software-properties-common -RUN add-apt-repository -y ppa:ansible/ansible -RUN apt-get update -y -RUN apt-get install -y ansible git-core -# Install Ansible inventory file -RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts +# Dockerfile.ubuntu +FROM ubuntu-upstart:14.04 +# Install Ansible +#RUN mv /sbin/initctl.distrib /sbin/initctl +RUN apt-get update -y +RUN apt-get install -y python-software-properties software-properties-common +RUN add-apt-repository -y ppa:ansible/ansible +RUN apt-get update -y +RUN apt-get install -y ansible git-core +# Install Ansible inventory file +RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts diff --git a/tests/Dockerfile.ubuntu-16.04 b/tests/Dockerfile.ubuntu-16.04 index b64762d..7a3b341 100644 --- a/tests/Dockerfile.ubuntu-16.04 +++ b/tests/Dockerfile.ubuntu-16.04 @@ -1,52 +1,52 @@ -# Dockerfile.ubuntu -FROM ubuntu:16.04 - -RUN systemctl mask -- \ - -.mount \ - dev-mqueue.mount \ - dev-hugepages.mount \ - etc-hosts.mount \ - etc-hostname.mount \ - etc-resolv.conf.mount \ - proc-bus.mount \ - proc-irq.mount \ - proc-kcore.mount \ - proc-sys-fs-binfmt_misc.mount \ - proc-sysrq\\\\x2dtrigger.mount \ - sys-fs-fuse-connections.mount \ - sys-kernel-config.mount \ - sys-kernel-debug.mount \ - tmp.mount \ - \ - && systemctl mask -- \ - console-getty.service \ - display-manager.service \ - getty-static.service \ - getty\@tty1.service \ - hwclock-save.service \ - ondemand.service \ - systemd-logind.service \ - systemd-remount-fs.service \ - \ - && ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target \ - \ -&& ln -sf /lib/systemd/system/halt.target /etc/systemd/system/sigpwr.target - -RUN apt-get update -qq -y -RUN apt-get install -qq -y python-software-properties software-properties-common \ - rsyslog systemd systemd-cron sudo -RUN sed -i 's/^\($ModLoad imklog\)/#\1/' /etc/rsyslog.conf -#ADD etc/rsyslog.d/50-default.conf /etc/rsyslog.d/50-default.conf - -# Install Ansible -RUN add-apt-repository -y ppa:ansible/ansible -RUN apt-get update -y -RUN apt-get install -y ansible git-core -# Install Ansible inventory file -RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts - -VOLUME ["/sys/fs/cgroup"] -VOLUME ["/run"] -CMD ["/sbin/init"] - - +# Dockerfile.ubuntu +FROM ubuntu:16.04 + +RUN systemctl mask -- \ + -.mount \ + dev-mqueue.mount \ + dev-hugepages.mount \ + etc-hosts.mount \ + etc-hostname.mount \ + etc-resolv.conf.mount \ + proc-bus.mount \ + proc-irq.mount \ + proc-kcore.mount \ + proc-sys-fs-binfmt_misc.mount \ + proc-sysrq\\\\x2dtrigger.mount \ + sys-fs-fuse-connections.mount \ + sys-kernel-config.mount \ + sys-kernel-debug.mount \ + tmp.mount \ + \ + && systemctl mask -- \ + console-getty.service \ + display-manager.service \ + getty-static.service \ + getty\@tty1.service \ + hwclock-save.service \ + ondemand.service \ + systemd-logind.service \ + systemd-remount-fs.service \ + \ + && ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target \ + \ +&& ln -sf /lib/systemd/system/halt.target /etc/systemd/system/sigpwr.target + +RUN apt-get update -qq -y +RUN apt-get install -qq -y python-software-properties software-properties-common \ + rsyslog systemd systemd-cron sudo +RUN sed -i 's/^\($ModLoad imklog\)/#\1/' /etc/rsyslog.conf +#ADD etc/rsyslog.d/50-default.conf /etc/rsyslog.d/50-default.conf + +# Install Ansible +RUN add-apt-repository -y ppa:ansible/ansible +RUN apt-get update -y +RUN apt-get install -y ansible git-core +# Install Ansible inventory file +RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts + +VOLUME ["/sys/fs/cgroup"] +VOLUME ["/run"] +CMD ["/sbin/init"] + + diff --git a/tests/Dockerfile.ubuntu-18.04 b/tests/Dockerfile.ubuntu-18.04 index 8467f64..00d03a4 100644 --- a/tests/Dockerfile.ubuntu-18.04 +++ b/tests/Dockerfile.ubuntu-18.04 @@ -1,50 +1,40 @@ -# Dockerfile.ubuntu -FROM ubuntu:18.04 - -RUN systemctl mask -- \ - -.mount \ - dev-mqueue.mount \ - dev-hugepages.mount \ - etc-hosts.mount \ - etc-hostname.mount \ - etc-resolv.conf.mount \ - proc-bus.mount \ - proc-irq.mount \ - proc-kcore.mount \ - proc-sys-fs-binfmt_misc.mount \ - proc-sysrq\\\\x2dtrigger.mount \ - sys-fs-fuse-connections.mount \ - sys-kernel-config.mount \ - sys-kernel-debug.mount \ - tmp.mount \ - \ - && systemctl mask -- \ - console-getty.service \ - display-manager.service \ - getty-static.service \ - getty\@tty1.service \ - hwclock-save.service \ - ondemand.service \ - systemd-logind.service \ - systemd-remount-fs.service \ - \ - && ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target \ - \ -&& ln -sf /lib/systemd/system/halt.target /etc/systemd/system/sigpwr.target - -RUN apt-get update -qq -y -RUN apt-get install -qq -y python-software-properties software-properties-common \ - rsyslog systemd systemd-cron sudo -RUN sed -i 's/^\($ModLoad imklog\)/#\1/' /etc/rsyslog.conf -#ADD etc/rsyslog.d/50-default.conf /etc/rsyslog.d/50-default.conf - -# Install Ansible -RUN add-apt-repository -y ppa:ansible/ansible -RUN apt-get update -y -RUN apt-get install -y ansible git-core -# Install Ansible inventory file -RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts - -VOLUME ["/sys/fs/cgroup"] -VOLUME ["/run"] -CMD ["/sbin/init"] +FROM ubuntu:18.04 + +ENV pip_packages "ansible" + +# Install dependencies. +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + apt-utils \ + locales \ + python3-setuptools \ + python3-pip \ + software-properties-common git-core\ + rsyslog systemd systemd-cron sudo iproute2 \ + && rm -Rf /var/lib/apt/lists/* \ + && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \ + && apt-get clean +RUN sed -i 's/^\($ModLoad imklog\)/#\1/' /etc/rsyslog.conf + +# Fix potential UTF-8 errors with ansible-test. +RUN locale-gen en_US.UTF-8 + +# Install Ansible via Pip. +RUN pip3 install $pip_packages + +# Install Ansible +# RUN add-apt-repository -y ppa:ansible/ansible +# RUN apt-get update -y +# RUN apt-get install -y ansible git-core + +# Install Ansible inventory file. +RUN mkdir -p /etc/ansible +RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts + +# Remove unnecessary getty and udev targets that result in high CPU usage when using +# multiple containers with Molecule (https://github.com/ansible/molecule/issues/1104) +RUN rm -f /lib/systemd/system/systemd*udev* \ + && rm -f /lib/systemd/system/getty.target + +VOLUME ["/sys/fs/cgroup", "/tmp", "/run"] +CMD ["/lib/systemd/systemd"] \ No newline at end of file From 3f4afd52d3b20e658d44eb8dc1bf2736b9c322c4 Mon Sep 17 00:00:00 2001 From: Lossos <1607884+lossos@users.noreply.github.com> Date: Fri, 5 Jun 2020 10:02:51 +0200 Subject: [PATCH 3/5] Modified travis-ci pipeline for testing --- .travis.yml | 128 ++++++++++++++++++++--------------------------- tests/travis.yml | 29 +++++++++++ 2 files changed, 84 insertions(+), 73 deletions(-) create mode 100644 tests/travis.yml diff --git a/.travis.yml b/.travis.yml index 29deb45..c23a1e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,73 +1,55 @@ ---- -sudo: required -dist: trusty -language: generic - -env: - - > - dist=debian - ver=8 - container_id=$(mktemp) - init=/sbin/init - run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" - EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}' - VERBOSE='-vv' - - > - dist=centos - ver=7 - container_id=$(mktemp) - init=/usr/lib/systemd/systemd - run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" - EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}' - VERBOSE='-vv' - - > - dist=ubuntu - ver=14.04 - container_id=$(mktemp) - init=/sbin/init - run_opts="" - EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}' - VERBOSE='-vv' - - > - dist=ubuntu - ver=16.04 - container_id=$(mktemp) - init=/sbin/init - run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" - EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}' - VERBOSE='-vv' - - > - dist=ubuntu - ver=18.04 - container_id=$(mktemp) - init=/sbin/init - run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" - EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}' - VERBOSE='-vv' - -services: - - docker - -before_install: - - sudo docker build --rm=true - --file="tests/Dockerfile.${dist}-${ver}" - --tag="${dist}:ansible" tests - -before_script: - - sudo docker run --detach - --volume="${PWD}:/etc/ansible/roles/Rocket.Chat.Ansible:ro" - ${run_opts} "${dist}:ansible" "${init}" > "${container_id}" - -script: - - sudo docker exec --tty "$(cat ${container_id})" - env TERM=xterm ansible-playbook - /etc/ansible/roles/Rocket.Chat.Ansible/tests/provision.yml - --extra-vars="$EXTRA_VARS" $VERBOSE --syntax-check - - - sudo docker exec --tty "$(cat ${container_id})" - env TERM=xterm ansible-playbook - /etc/ansible/roles/Rocket.Chat.Ansible/tests/provision.yml - --extra-vars="$EXTRA_VARS" $VERBOSE - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ +--- +os: linux +dist: xenial + +env: + - distribution: centos + version: 7 + + - distribution: debian + version: stretch + +# - distribution: debian +# version: jessie + + - distribution: debian + version: buster + + - distribution: ubuntu + version: 14.04 + + - distribution: ubuntu + version: 16.04 + + - distribution: ubuntu + version: 18.04 + +# - distribution: ubuntu +# version: 20.04 + +services: + - docker + +before_install: + - 'sudo docker pull ${distribution}:${version}' + - 'sudo docker build --no-cache --rm --file=tests/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests' + +script: + - container_id=$(mktemp) + - 'sudo docker run --detach --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --volume="${PWD}":/etc/ansible/roles/Rocket.Chat.Ansible:ro ${distribution}-${version}:ansible > "${container_id}"' + + # Verify Ansible is available in the container. + - sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible --version + + # Verify Ansible Scripts + - 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/Rocket.Chat.Ansible/tests/travis.yml --syntax-check' + - 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/Rocket.Chat.Ansible/tests/travis.yml' +# - > +# sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/Rocket.Chat.Ansible/tests/travis.yml +# | grep -q 'changed=0.*failed=0' +# && (echo 'Idempotence test: pass' && exit 0) +# || (echo 'Idempotence test: fail' && exit 1) + - 'sudo docker rm -f "$(cat ${container_id})"' + +#notifications: +# webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/tests/travis.yml b/tests/travis.yml new file mode 100644 index 0000000..d76175c --- /dev/null +++ b/tests/travis.yml @@ -0,0 +1,29 @@ +--- +- hosts: all + + pre_tasks: + - name: Ensure build dependencies are installed (RedHat) + package: + name: "{{ item }}" + state: present + with_items: + - "@Development tools" + - tar + - unzip + - sudo + - which + when: ansible_os_family == 'RedHat' + + - name: Ensure build dependencies are installed (Debian) + package: + name: "{{ item }}" + state: present + with_items: + - build-essential + - unzip + - tar + - sudo + when: ansible_os_family == 'Debian' + + roles: + - Rocket.Chat.Ansible \ No newline at end of file From 59adcc1ddc4fc005ac6943cbe18cfcb98fbffafa Mon Sep 17 00:00:00 2001 From: Lossos <1607884+lossos@users.noreply.github.com> Date: Fri, 5 Jun 2020 10:05:06 +0200 Subject: [PATCH 4/5] Modified Description and Meta for Debian Support Debian Jessie seems not to work anymore, but stretch and buster does work. Modified README.md and meta/main.yml to reflect this. --- README.md | 3 ++- meta/main.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1cccd0b..0362223 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ Features Supported Platforms ------------------- ### Debian -- Jessie (8) +- Strect (9) +- Buster (10) ### Ubuntu - Bionic Beaver: 18.04 LTS diff --git a/meta/main.yml b/meta/main.yml index 1c0e7ff..f5a41b7 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -23,7 +23,7 @@ galaxy_info: - bionic - name: Debian versions: - - jessie + - buster - stretch galaxy_tags: - cloud From a263a69b28816ce399818b561822f523f6ef6d3e Mon Sep 17 00:00:00 2001 From: Lossos <1607884+lossos@users.noreply.github.com> Date: Fri, 5 Jun 2020 10:10:15 +0200 Subject: [PATCH 5/5] Some dependencies (e.g. gnupg2) need to be installed before MongoDB Moved dependency installation before mongodb installation --- tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 38ceb63..b6b16a9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -80,7 +80,7 @@ - name: "Configure /etc/hosts" lineinfile: dest: /etc/hosts - line: "{{ item.line }}" + line: "{{ item.line }}" regexp: "{{ item.regexp }}" insertafter: "{{ item.insertafter | default(omit) }}" insertbefore: "{{ item.insertbefore | default(omit) }}" @@ -99,10 +99,6 @@ backrefs: no register: hosts_change_result - - import_tasks: mongodb.yml - when: (rocket_chat_include_mongodb | bool) - tags: mongodb - - name: Redefine rocket_chat_dep_packages to add dist specific packages if needed set_fact: rocket_chat_dep_packages: @@ -127,6 +123,10 @@ retries: 2 tags: packages + - import_tasks: mongodb.yml + when: (rocket_chat_include_mongodb | bool) + tags: mongodb + - import_tasks: nodejs.yml tags: nodejs