summaryrefslogtreecommitdiff
path: root/roles/sapp/tasks/main.yml
blob: 5472990a6ac0b5475bd11947afb3c52548714da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
- name: "copy sapp to destination server"
  copy:
    src: "{{ role_path }}/files/"
    dest: /tmp/ansible_deploy/

- name: "copy maat_redis_tool to destination server"
  copy:
    src: "{{ role_path }}/files/maat_redis_tool"
    dest: /usr/local/bin
    mode: 0755

- name: "install sapp rpms from localhost"
  yum:
    name:
      - /tmp/ansible_deploy/sapp-4.1.13.ed89137-2.el7.x86_64.rpm
    state: present
    skip_broken: yes

- name: "mkdir tsgconf"
  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: "Template sapp.service destination server"
  template:
    src: "{{ role_path }}/templates/sapp.service.j2"
    dest: /usr/lib/systemd/system/sapp.service
    mode: 0755

- name: "enable sapp"
  systemd:
    name: sapp
    enabled: yes
    daemon_reload: yes