From 063a50120b74a8ada0088ad2f9baad85cc58fa5d Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Sat, 24 Nov 2018 10:00:40 +0100 Subject: [PATCH] Fix Ansible warnings And add support for Ubuntu 18.04 --- .travis.yml | 4 +++- Vagrantfile | 13 ++++++++++--- meta/main.yml | 2 ++ tasks/main.yml | 8 ++++---- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 919d3f8..74eced2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,10 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.7.2 - ANSIBLE_VERSION=2.7.1 - ANSIBLE_VERSION=2.7.0 + - ANSIBLE_VERSION=2.6.8 - ANSIBLE_VERSION=2.6.7 - ANSIBLE_VERSION=2.6.6 - ANSIBLE_VERSION=2.6.5 @@ -56,7 +58,7 @@ script: && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - - if [ "$ANSIBLE_VERSION" = "latest" ]; then ansible-lint tests/test.yml || true; fi + - if [ "$ANSIBLE_VERSION" = "latest" ]; then ansible-lint tests/test.yml; fi notifications: email: false diff --git a/Vagrantfile b/Vagrantfile index 0697955..e2d0d24 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -25,24 +25,31 @@ boxes = [ :cpu => "50", :ram => "256" }, + { + :name => "ubuntu-1804", + :box => "bento/ubuntu-18.04", + :ip => '10.0.0.14', + :cpu => "50", + :ram => "256" + }, { :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" }, diff --git a/meta/main.yml b/meta/main.yml index e1dd61d..3f79072 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,6 +1,7 @@ # meta file for pip --- galaxy_info: + role_name: pip author: Mischa ter Smitten company: Oefenweb.nl B.V. description: Set up (the latest version of) pip, setuptools and wheel in Debian-like systems @@ -12,6 +13,7 @@ galaxy_info: - precise - trusty - xenial + - bionic - name: Debian versions: - wheezy diff --git a/tasks/main.yml b/tasks/main.yml index 3a47392..034bd91 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,11 +2,10 @@ --- - name: install dependencies apt: - name: "{{ item }}" + name: "{{ pip_dependencies }}" state: "{{ apt_install_state | default('latest') }}" update_cache: true cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" - with_items: "{{ pip_dependencies }}" tags: - configuration - pip @@ -39,8 +38,9 @@ - pip-pip-download - name: install (latest) pip (setuptools and wheel) - command: python {{ _download_latest.dest }} - when: _download_latest | changed + command: > + python {{ _download_latest.dest }} + when: _download_latest is changed tags: - configuration - pip