install_webgate.yml 1.71 KB
---
- hosts: 05_install-webgate-wdchat-dma-twohost
  become: true
  tasks:
    - name: Move NginX to Working Folder
      command: cp /tmp/source/webgate.3.0.4.tar.gz /opt/stack/webgate.3.0.4.tar.gz
    - name: Extract NginX
      command: tar -zxvf /opt/stack/webgate.3.0.4.tar.gz -C /opt/stack/
    - name: Delete File
      command: rm /opt/stack/webgate.3.0.4.tar.gz

- hosts: 05_install-webgate-wdchat-dma
  become: true
  tasks:
    - name: Move NginX to Working Folder
      command: cp /tmp/source/webgate.singlehost.dma.plus.wdchat.conf.tar.gz /opt/stack/webgate.singlehost.dma.plus.wdchat.conf.tar.gz
    - name: Extract NginX
      command: tar -zxvf /opt/stack/webgate.singlehost.dma.plus.wdchat.conf.tar.gz -C /opt/stack/
    - name: Delete File
      command: rm /opt/stack/webgate.singlehost.dma.plus.wdchat.conf.tar.gz

- hosts: 05_install-webgate-dma
  become: true
  tasks:
    - name: Move NginX to Working Folder
      command: cp /tmp/source/webgate.singlehost.dma.conf.tar.gz /opt/stack/webgate.singlehost.dma.conf.tar.gz
    - name: Extract NginX
      command: tar -zxvf /opt/stack/webgate.singlehost.dma.conf.tar.gz -C /opt/stack/
    - name: Delete File
      command: rm /opt/stack/webgate.singlehost.dma.conf.tar.gz
      
- hosts: 05_install-webgate-dma-3.1.0
  become: true
  tasks:
    - name: Unarchive a file that is already on the remote machine
      unarchive:
        src: /tmp/source/webgate.3.1.0.zip
        dest: /opt/stack
        remote_src: yes
        group: nginx
        owner: nginx
        mode: 0755
    - file:
        path: '/opt/{{ item.dir }}' 
        group: nginx
        owner: nginx
        mode: 0755
        state: directory
        recurse: yes
      with_items:
            - { dir: 'nginx' }