system-manangement.yml 2.42 KB
- name: Begin Install Security License System
  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: Gen License Request File
  command: /root/bin/gen_license_request.py
  args:
     chdir: /root/bin
- name: Gen License File
  command: /root/bin/gen_license.py /root/bin/request_license.txt /root/bin/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: End Install Security License System
  command: rm /root/bin/license.enc
  
- name: Begin Install iConsole-Management System
  unarchive:
    src: /tmp/source/iConsole.singlehost.dma.3.0.6.0.zip
    dest: /opt
    remote_src: yes
    group: wdadmin
    owner: wdadmin
    mode: 0755
- file:
    path: '/opt/{{ item.dir }}' 
    group: wdadmin
    owner: wdadmin
    mode: 0755
    state: directory
    recurse: yes
  with_items:
        - { dir: 'Accessor' }
        - { dir: 'iConsole' }
        - { dir: 'json' }
        - { dir: 'Schedule' }
- name: Add iConsole Schedule
  command: /opt/Schedule/add_schedule
- name: End Install iConsole-Management System - Deploy iConsole
  command: cp /tmp/application/iConsole-3.0.6.0.war /opt/stack/admin/wildfly/standalone/deployments/iConsole.war

- name: Begin Install Default Certificate
  command: cp /tmp/configuration/beebuddy.ssl/server.crt /opt/stack/nginx/conf/ssl/server.crt
- name: End Install Default Certificate
  command: cp /tmp/configuration/beebuddy.ssl/server.key /opt/stack/nginx/conf/ssl/server.key
  
- name: Begin Install NTP Configuration
  command: cp /tmp/configuration/ntp.conf /etc/ntp.conf
- name: End Install NTP service
  command: systemctl restart ntp.service
  
- name: Install Stack Management Script
  unarchive:
    src: /tmp/source/stackscript.singlehost.zip
    dest: /opt/stack
    remote_src: yes
    group: wdadmin
    owner: wdadmin
    mode: 0711
- file:
    path: '/opt/stack/{{ item.dir }}' 
    group: wdadmin
    owner: wdadmin
    mode: 0755
    state: directory
    recurse: yes
  with_items:
        - { dir: 'script' }
  
- name: Begin Setup System Service
  command: /opt/stack/script/add_service.sh /opt/stack/script/engine.service
- name: End Setup System Service
  command: /opt/stack/script/add_service.sh /opt/stack/script/nginx.tcp.service