summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-nginx/tasks/main.yml
blob: 820f5cc8c07c18e4f20b2158d1c712d7d0685018 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- 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:
    build:
      path: ../../../../../build/creating_data/create_nginx_image/
    source: build
    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
    source: local

- name: Copy nginx image to node
  copy:
    src: /tmp/nginx.tar
    dest: "{{ infra_images_path }}/{{ nginx_server_image_tar }}"