summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-vncserver
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2019-05-27 13:55:40 +0200
committerMichal Ptacek <m.ptacek@partner.samsung.com>2019-05-29 10:43:17 +0000
commit063c08c610d26050a14c73c9abe21d1ea1440fbf (patch)
treec64a0f3ef9f0271a8bef9f26a7d2b32155979f39 /ansible/test/roles/prepare-vncserver
parent835643ae86c433a4ff823ea5f81411aa6016fdb7 (diff)
Add prepare-vncserver role
This role is used by infra playbook tests introduced in a follow up commit and it downloads the docker vncserver image used during testing. This role may also be useful for vncserver role tests. Change-Id: Ib9fc8041519d716207f2c1887f68fb29faab911f Issue-ID: OOM-1816 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com> Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'ansible/test/roles/prepare-vncserver')
-rw-r--r--ansible/test/roles/prepare-vncserver/tasks/main.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/ansible/test/roles/prepare-vncserver/tasks/main.yml b/ansible/test/roles/prepare-vncserver/tasks/main.yml
new file mode 100644
index 00000000..cb7a5f8a
--- /dev/null
+++ b/ansible/test/roles/prepare-vncserver/tasks/main.yml
@@ -0,0 +1,21 @@
+---
+- name: "Create needed dirs for vncserver role"
+ file:
+ path: "{{ item }}"
+ state: directory
+ mode: "u+rw,g+wx,o+rwx"
+ recurse: true
+ loop:
+ - "{{ infra_images_path }}"
+
+- name: Download and archive vncserver docker image for the vncserver role to use
+ delegate_to: localhost
+ docker_image:
+ name: "{{ vnc_server_image }}"
+ state: present
+ archive_path: /tmp/vncserver.tar
+
+- name: Copy vnc server image to node
+ copy:
+ src: /tmp/vncserver.tar
+ dest: "{{ infra_images_path }}/{{ vnc_server_image_tar }}"