diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6d537d5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:16.04 +MAINTAINER Mischa ter Smitten + +# python +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y python-minimal python-dev curl && \ + apt-get clean +RUN curl -sL https://bootstrap.pypa.io/get-pip.py | python - +RUN rm -rf $HOME/.cache + +# ansible +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc libffi-dev libssl-dev && \ + apt-get clean +RUN pip install ansible==2.6.2 +RUN rm -rf $HOME/.cache + +# provision +COPY . /etc/ansible/roles/ansible-role +WORKDIR /etc/ansible/roles/ansible-role +RUN ansible-playbook -i tests/inventory tests/test.yml --connection=local diff --git a/Vagrantfile b/Vagrantfile index 0697955..3517233 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -25,24 +25,38 @@ boxes = [ :cpu => "50", :ram => "256" }, + { + :name => "ubuntu-1804", + :box => "bento/ubuntu-18.04", + :ip => '10.0.0.14', + :cpu => "50", + :ram => "384" + }, { :name => "debian-7", :box => "bento/debian-7", - :ip => '10.0.0.14', + :ip => '10.0.0.15', :cpu => "50", :ram => "256" }, { :name => "debian-8", :box => "bento/debian-8", - :ip => '10.0.0.15', + :ip => '10.0.0.16', :cpu => "50", :ram => "256" }, { :name => "debian-9", :box => "bento/debian-9", - :ip => '10.0.0.16', + :ip => '10.0.0.17', + :cpu => "50", + :ram => "256" + }, + { + :name => "debian-10", + :box => "bento/debian-10", + :ip => '10.0.0.18', :cpu => "50", :ram => "256" }, diff --git a/meta/main.yml b/meta/main.yml index ca6e4c6..7585ec8 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -13,11 +13,13 @@ galaxy_info: - precise - trusty - xenial + - bionic - name: Debian versions: - wheezy - jessie - stretch + - buster galaxy_tags: - system - database diff --git a/tasks/repository.yml b/tasks/repository.yml index 344248b..016b5a1 100644 --- a/tasks/repository.yml +++ b/tasks/repository.yml @@ -7,7 +7,9 @@ state: "{{ apt_install_state | default('latest') }}" update_cache: true cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" - when: ansible_distribution == 'Debian' and ansible_distribution_version is version('9', '>=') + when: + - ansible_distribution == 'Debian' + - ansible_distribution_version is version('9', '>=') tags: - percona-client-repository-install - percona-client-repository-install-dependencies