nginx.yml 555 Bytes
- name: Stop All Service
  shell: /opt/stack/script/ctlscript.sh stop
- name: Remove Nginx if exist
  file:
    state: absent
    path: /opt/stack/nginx
- name: Install NginX
  unarchive:
        src: /tmp/source/webgate.3.1.0.zip
        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' }