dma-nginx.yml 610 Bytes
- name: Remove Nginx if exist
  file:
    state: absent
    path: /opt/stack/nginx
- name: Install NginX
  unarchive:
        src: /tmp/source/nginx.onehost.3.2.0.tar.gz
        dest: /opt/stack
        remote_src: yes
        group: nginx
        owner: nginx
        mode: 0755
- file:
        path: '/opt/stack/{{ item.dir }}' 
        group: nginx
        owner: nginx
        mode: 0755
        state: directory
        recurse: yes
  with_items:
            - { dir: 'nginx' }
    
- name: Enable DMA Site
  shell: cp /opt/stack/nginx/conf/all-site/dma.conf /opt/stack/nginx/conf/enabled-site/dma.conf