diff options
author | Tomáš Levora <t.levora@partner.samsung.com> | 2019-03-28 17:45:55 +0100 |
---|---|---|
committer | Tomáš Levora <t.levora@partner.samsung.com> | 2019-04-05 11:41:16 +0000 |
commit | a0ad5c1091c43b96b7b54b4a2c4eca02d5f9a4eb (patch) | |
tree | f953a79e5314787e66c6e4788822aa230dc04177 /ansible/roles/dns | |
parent | 171c3dc7dd5a9cdc25651812dc716174c38d5f06 (diff) |
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>
Diffstat (limited to 'ansible/roles/dns')
-rw-r--r-- | ansible/roles/dns/defaults/main.yml | 3 | ||||
-rw-r--r-- | ansible/roles/dns/handlers/main.yml | 6 | ||||
-rw-r--r-- | ansible/roles/dns/tasks/main.yml | 16 |
3 files changed, 14 insertions, 11 deletions
diff --git a/ansible/roles/dns/defaults/main.yml b/ansible/roles/dns/defaults/main.yml new file mode 100644 index 00000000..f69d965d --- /dev/null +++ b/ansible/roles/dns/defaults/main.yml @@ -0,0 +1,3 @@ +--- +# Default rule for tarball naming translation +dns_server_image_tar: "{{ dns_server_image | regex_replace('(\\/|\\:)', '_') }}.tar" diff --git a/ansible/roles/dns/handlers/main.yml b/ansible/roles/dns/handlers/main.yml index ac3209dc..9d77893a 100644 --- a/ansible/roles/dns/handlers/main.yml +++ b/ansible/roles/dns/handlers/main.yml @@ -1,8 +1,8 @@ --- -- name: Restart dnsmasq container +- name: Restart dns server container docker_container: - name: dnsmasq - image: andyshinn/dnsmasq:2.76 + name: dns-server + image: "{{ dns_server_image }}" command: -H /simulated_hosts --log-facility=- capabilities: NET_ADMIN volumes: diff --git a/ansible/roles/dns/tasks/main.yml b/ansible/roles/dns/tasks/main.yml index 2bc05648..3eba9fdb 100644 --- a/ansible/roles/dns/tasks/main.yml +++ b/ansible/roles/dns/tasks/main.yml @@ -8,21 +8,21 @@ template: src: simulated_hosts.j2 dest: "{{ app_data_path }}/cfg/simulated_hosts" - notify: Restart dnsmasq container + notify: Restart dns server container -- name: Load dnsmasq container +- name: Load dns server container docker_image: - name: andyshinn/dnsmasq:2.76 - load_path: "{{ app_data_path }}/offline_data/docker_images_infra/andyshinn_dnsmasq_2.76.tar" + name: "{{ dns_server_image }}" + load_path: "{{ infra_images_path }}/{{ dns_server_image_tar }}" state: present timeout: 120 - notify: Restart dnsmasq container + notify: Restart dns server container -- name: Start dnsmasq container +- name: Start dns server container docker_container: - name: dnsmasq + name: dns-server network_mode: host - image: andyshinn/dnsmasq:2.76 + image: "{{ dns_server_image }}" command: -H /simulated_hosts --log-facility=- capabilities: NET_ADMIN dns_servers: |