wdchat-nginx.yml 797 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 WDCHAT Site
  shell: cp /opt/stack/nginx/conf/all-site/wdchat.conf /opt/stack/nginx/conf/enabled-site/wdchat.conf

- name: Enable WDCHAT Download Site
  shell: cp /opt/stack/nginx/conf/all-site/wdchatappdownload.conf /opt/stack/nginx/conf/enabled-site/wdchatappdownload.conf