summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-nginx
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/test/roles/prepare-nginx')
-rw-r--r--ansible/test/roles/prepare-nginx/tasks/main.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/ansible/test/roles/prepare-nginx/tasks/main.yml b/ansible/test/roles/prepare-nginx/tasks/main.yml
new file mode 100644
index 00000000..3cd93990
--- /dev/null
+++ b/ansible/test/roles/prepare-nginx/tasks/main.yml
@@ -0,0 +1,28 @@
+---
+- name: "Create needed dirs for nginx role"
+ file:
+ path: "{{ item }}"
+ state: directory
+ mode: "u+rw,g+wx,o+rwx"
+ recurse: true
+ loop:
+ - "{{ infra_images_path }}"
+
+- name: Build nginx docker image
+ delegate_to: localhost
+ docker_image:
+ path: ../../../../../build/creating_data/create_nginx_image/
+ name: own_nginx
+ tag: 2.0.0
+
+- name: Archive nginx docker image for the nginx role to use
+ delegate_to: localhost
+ docker_image:
+ name: own_nginx
+ tag: 2.0.0
+ archive_path: /tmp/nginx.tar
+
+- name: Copy nginx image to node
+ copy:
+ src: /tmp/nginx.tar
+ dest: "{{ infra_images_path }}/{{ nginx_server_image_tar }}"