From f128ff86e9868529698f6da30dc13ef0daed83bc Mon Sep 17 00:00:00 2001 From: haxorof Date: Tue, 20 Dec 2016 08:39:44 +0100 Subject: [PATCH] Added missing package wget --- tasks/env.yml | 15 +++++++++------ test/docker-run.sh | 2 ++ test/test-docker.sh | 4 +++- 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 test/docker-run.sh diff --git a/tasks/env.yml b/tasks/env.yml index e966316..1b3a900 100644 --- a/tasks/env.yml +++ b/tasks/env.yml @@ -1,3 +1,12 @@ +- name: Ensure required packages is present + package: > + name={{item}} + state=present + become: true + with_items: + - unzip + - wget + - name: Architecture - linux_amd64 set_fact: hashicorp_architecture: linux_amd64 @@ -10,12 +19,6 @@ when: ansible_system == "Linux" and ansible_architecture == "i386" -- name: Ensure unzip is present - package: > - name=unzip - state=present - become: true - - name: Ensure HashiCorp temporary directory exists file: > path={{ hashicorp.download_dir }} diff --git a/test/docker-run.sh b/test/docker-run.sh new file mode 100644 index 0000000..40030f7 --- /dev/null +++ b/test/docker-run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker run --name ansible_test --rm -it -v '/vagrant:/vagrant' -v '/mnt/ansible:/mnt/ansible' ansible/centos7-ansible:stable /vagrant/test-docker.sh \ No newline at end of file diff --git a/test/test-docker.sh b/test/test-docker.sh index ed36f41..79f15fc 100644 --- a/test/test-docker.sh +++ b/test/test-docker.sh @@ -3,5 +3,7 @@ TEST_HOME=$HOME/ansible-test mkdir -p $TEST_HOME/roles cp /vagrant/* $TEST_HOME/ cd $TEST_HOME -ln -s /mnt/ansible $TEST_HOME/roles/role-under-test +if [[ ! -d $TEST_HOME/roles/role-under-test ]]; then + ln -s /mnt/ansible $TEST_HOME/roles/role-under-test +fi $TEST_HOME/test.sh