summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2019-05-27 13:57:24 +0200
committerMichal Ptacek <m.ptacek@partner.samsung.com>2019-05-29 10:43:34 +0000
commit6a9ea0f5dc609768e99f3e38e20f60401e3da2a1 (patch)
tree0c2f1441d80fc746f683457949bd460a764f4411 /ansible
parent063c08c610d26050a14c73c9abe21d1ea1440fbf (diff)
Add the prepare-dns role
This role can be used by infra playbook or dns role tests to download the dnsmasq docker images used during test. Change-Id: I05d9ccd1f2ac3d635c032b43078ca9a2179cb547 Issue-ID: OOM-1818 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com> Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'ansible')
-rw-r--r--ansible/test/roles/prepare-dns/tasks/main.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/ansible/test/roles/prepare-dns/tasks/main.yml b/ansible/test/roles/prepare-dns/tasks/main.yml
new file mode 100644
index 00000000..7907f868
--- /dev/null
+++ b/ansible/test/roles/prepare-dns/tasks/main.yml
@@ -0,0 +1,22 @@
+---
+- name: "Create needed dirs for dns role"
+ file:
+ path: "{{ item }}"
+ state: directory
+ mode: "u+rw,g+wx,o+rwx"
+ recurse: true
+ loop:
+ - "{{ app_data_path }}/cfg"
+ - "{{ infra_images_path }}"
+
+- name: Download and archive dnsmasq docker image for the dns role to use
+ delegate_to: localhost
+ docker_image:
+ name: andyshinn/dnsmasq
+ tag: 2.76
+ archive_path: /tmp/dnsmasq.tar
+
+- name: Copy dnsmasq image to node
+ copy:
+ src: /tmp/dnsmasq.tar
+ dest: "{{ infra_images_path }}/{{ dns_server_image_tar }}"