118 lines
3.3 KiB
YAML
118 lines
3.3 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/tsg-os-provision/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 entrylist.conf.j2
|
|
template:
|
|
src: "{{ role_path }}/templates/entrylist.conf.j2"
|
|
dest: /home/mesasoft/sapp_run/etc/entrylist.conf
|
|
tags: template
|
|
|
|
- name: Template the asymmetric_addr_layer.conf.j2
|
|
template:
|
|
src: "{{ role_path }}/templates/asymmetric_addr_layer.conf.j2"
|
|
dest: /home/mesasoft/sapp_run/etc/asymmetric_addr_layer.conf
|
|
tags: template
|
|
|
|
- name: Template the asymmetric_presence_layer.conf.j2
|
|
template:
|
|
src: "{{ role_path }}/templates/asymmetric_presence_layer.conf.j2"
|
|
dest: /home/mesasoft/sapp_run/etc/asymmetric_presence_layer.conf
|
|
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 vlan_flipping_map.conf
|
|
template:
|
|
src: "{{ role_path }}/templates/vlan_flipping_map.conf.j2"
|
|
dest: /home/mesasoft/sapp_run/etc/vlan_flipping_map.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.j2"
|
|
dest: /opt/tsg/tsg-os-provision/templates/gdev.conf.j2
|
|
tags: template
|
|
|
|
- name: "Create /usr/lib/systemd/system/sapp.service.d/ directory if it does not exist"
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: '0755'
|
|
with_items:
|
|
- /usr/lib/systemd/system/sapp.service.d
|
|
|
|
|
|
- name: "sapp: service override timeoutsec"
|
|
template:
|
|
src: "{{ role_path }}/templates/service_override_timeoutsec.conf.j2"
|
|
dest: /usr/lib/systemd/system/sapp.service.d/service_override_timeoutsec.conf
|
|
mode: 0644
|
|
|
|
- name: "copy memory limit file to sapp.service.d"
|
|
copy:
|
|
src: "{{ role_path }}/templates/service_override_memsw_limit.conf.j2"
|
|
dest: /usr/lib/systemd/system/sapp.service.d/service_override_memsw_limit.conf
|
|
mode: 0644
|
|
|
|
|
|
##################### sapp #####################
|
|
- name: "enable sapp"
|
|
systemd:
|
|
name: sapp
|
|
enabled: yes
|