98 lines
2.5 KiB
YAML
98 lines
2.5 KiB
YAML
---
|
|
- 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 and tcpdump_mesa rpms from localhost"
|
|
yum:
|
|
name: "{{ item.value }}"
|
|
conf_file: "{{ rpm_repo_config_path }}"
|
|
state: present
|
|
with_dict: "{{ sapp_rpm_version }}"
|
|
|
|
- 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.j2"
|
|
dest: /opt/tsg/init_runtime/templates/sapp.toml.j2
|
|
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 necessary_plug_list.conf
|
|
template:
|
|
src: "{{ role_path }}/templates/necessary_plug_list.conf.j2"
|
|
dest: /home/mesasoft/sapp_run/etc/necessary_plug_list.conf
|
|
tags: template
|
|
|
|
- name: Template the sapp_log.conf
|
|
template:
|
|
src: "{{ role_path }}/templates/sapp_log.conf.j2"
|
|
dest: /home/mesasoft/sapp_run/etc/sapp_log.conf
|
|
tags: template
|
|
|
|
- name: Template the sapp_tmpfile.conf
|
|
template:
|
|
src: "{{ role_path }}/templates/sapp_tmpfile.conf.j2"
|
|
dest: /etc/tmpfiles.d/sapp_tmpfile.conf
|
|
tags: template
|
|
|
|
- name: Template the gdev.conf
|
|
template:
|
|
src: "{{ role_path }}/templates/gdev.conf.j2"
|
|
dest: /home/mesasoft/sapp_run/etc/gdev.conf
|
|
tags: template
|
|
|
|
- name: "sapp: service adapts runtimes"
|
|
template:
|
|
src: "{{ role_path }}/templates/adapt_runtimes.j2"
|
|
dest: /usr/lib/systemd/system/sapp.service.d/
|
|
mode: 0644
|
|
|
|
- name: "copy memory limit file to sapp.service.d"
|
|
copy:
|
|
src: "{{ role_path }}/files/memory.conf"
|
|
dest: /usr/lib/systemd/system/sapp.service.d/
|
|
mode: 0644
|
|
|
|
- name: "Create /home/mesasoft/sapp_run/log/ directory if it does not exist"
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: '0755'
|
|
with_items:
|
|
- /home/mesasoft/sapp_run/log
|
|
|
|
- name: "Create a symbolic link for sapp logs"
|
|
file:
|
|
src: /home/mesasoft/sapp_run/log
|
|
dest: /var/log/sapp
|
|
state: link
|
|
|
|
##################### sapp #####################
|
|
- name: "enable sapp"
|
|
systemd:
|
|
name: sapp
|
|
enabled: yes
|