deploy_root.yml 792 Bytes
---
- hosts: all
  become: true
  tasks:
    - name: Copy root
      command: cp /tmp/source/root.tar.gz /root/root.tar.gz
    - name: Extract root
      command: tar -zxvf /root/root.tar.gz -C /root/
    - name: Delete File
      command: rm /root/root.tar.gz
    - name: Change Working Directory
      command: cd /root/bin
    - name: Gen License Request File
      command: /root/bin/gen_license_request.py
    - name: Gen License File
      command: /root/bin/gen_license.py request_license.txt license
    - name: Activate License
      command: cp /root/bin/license.enc /opt/iConsole/security/wdchat.license
    - name: Delete request_license.txt File 
      command: rm /root/bin/request_license.txt
    - name: Delete license.enc File 
      command: rm /root/bin/license.enc