This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
solutions-tsg-scripts/roles/sapp/tasks/main.yml
2020-04-29 14:59:53 +08:00

57 lines
1.4 KiB
YAML

---
- name: "copy sapp to destination server"
copy:
src: "{{ role_path }}/files/"
dest: /tmp/ansible_deploy/
- name: "install sapp rpms from localhost"
yum:
name:
# - /tmp/ansible_deploy/sapp-4.0.11.347f7b7-x86_64.rpm
- /tmp/ansible_deploy/tsg_master-debug-1.0.3.a4e2a7c-1.el7.centos.x86_64.rpm
state: present
- name: "judge sapp"
shell: rpm -qa |grep sapp
register: return
ignore_errors: true
- name: "install sapp rpms from localhost"
shell: cd /tmp/ansible_deploy;rpm -ivh sapp-4.0.8.fb5bce9-1.el7.x86_64.rpm
when: return.rc != 0
- name: make dir
file:
path: /home/mesasoft/sapp_run/tsgconf
state: directory
- name: Template the sapp.toml
template:
src: "{{ role_path }}/templates/sapp.toml.j2"
dest: /home/mesasoft/sapp_run/etc/sapp.toml
tags: template
- name: Template the project_list.conf
template:
src: "{{ role_path }}/templates/project_list.conf.j2"
dest: /home/mesasoft/sapp_run/etc/project_list.conf
tags: template
- name: Template the conflist.inf
template:
src: "{{ role_path }}/templates/conflist.inf.j2"
dest: /home/mesasoft/sapp_run/plug/conflist.inf
tags: template
- name: Template the gdev.conf
template:
src: "{{ role_path }}/templates/gdev.conf.j2"
dest: /home/mesasoft/sapp_run/etc/gdev.conf
when: tsg_access_type == 1
- name: "enable sapp"
systemd:
name: sapp
enabled: yes
daemon_reload: yes