Adding versions for infra related docker images
1. latest tag replaced by version number for vnc server
2. added specific version for own_nginx image
3. version control improved in ansible roles accordingly
Solves OOM-1766
Issue-ID: OOM-1767
Change-Id: I147c56b46a419188099d8ed3e78fed68810893e2
Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
diff --git a/ansible/roles/vncserver/defaults/main.yml b/ansible/roles/vncserver/defaults/main.yml
new file mode 100644
index 0000000..e74ccb7
--- /dev/null
+++ b/ansible/roles/vncserver/defaults/main.yml
@@ -0,0 +1,3 @@
+---
+# Default rule for tarball naming translation
+vnc_server_image_tar: "{{ vnc_server_image | regex_replace('(\\/|\\:)', '_') }}.tar"
diff --git a/ansible/roles/vncserver/tasks/main.yml b/ansible/roles/vncserver/tasks/main.yml
index 56ae707..b1aaed9 100644
--- a/ansible/roles/vncserver/tasks/main.yml
+++ b/ansible/roles/vncserver/tasks/main.yml
@@ -1,15 +1,15 @@
---
- name: Load VNC server image
docker_image:
- name: consol/centos-icewm-vnc:latest
- load_path: '{{ app_data_path }}/offline_data/docker_images_infra/consol_centos_icewm_vnc_latest.tar'
+ name: "{{ vnc_server_image }}"
+ load_path: "{{ infra_images_path }}/{{ vnc_server_image_tar }}"
state: present
timeout: 120
-- name: Run VNC server
+- name: Start VNC server container
docker_container:
- name: vnc_server
- image: consol/centos-icewm-vnc
+ name: vnc-server
+ image: "{{ vnc_server_image }}"
state: started
restart_policy: unless-stopped
ports: