--- - name: Create configuration directory file: path: "{{ app_data_path }}/cfg" state: directory - name: Upload configuration to server template: src: nginx.conf.j2 dest: "{{ app_data_path }}/cfg/nginx.conf" - name: Load nginx server image docker_image: name: "{{ nginx_server_image }}" load_path: "{{ infra_images_path }}/{{ nginx_server_image_tar }}" state: present timeout: 120 - name: Create nexus network docker_network: name: nexus_network state: present - name: Start nginx server container docker_container: name: nginx-server image: "{{ nginx_server_image }}" networks: - name: nexus_network ports: "{{ nginx.ports }}" volumes: "{{ nginx.volumes }}" state: started restart_policy: unless-stopped