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
tsg-tsg-os-buildimage/ansible/roles/sapp/tasks/main.yml
lijia 85e9a783cd update sapp from v4.2.37.ead1db6 to v4.2.39.3c2b02b;
TSG-5511,
TSG-6647,
TSG-6703,
修复sapp -g参数测试breakpad mini core上传功能失效的BUG,
add sapp config file well_known_port.conf;
delete sapp asymmetric_presence_layer.conf;
2021-06-30 10:15:25 +08:00

158 lines
4.7 KiB
YAML

---
- name: "copy sapp to destination server"
copy:
src: "{{ role_path }}/files/"
dest: /tmp/ansible_deploy/
- 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 - tsg_9140
template:
src: "{{ role_path }}/templates/conflist.inf.j2.9000NPBP01R01"
dest: /home/mesasoft/sapp_run/plug/conflist.inf
tags: template
when:
- PROFILE_ID == '9000-NPB-P01R01'
- name: Template the conflist.inf - tsg_7400
template:
src: "{{ role_path }}/templates/conflist.inf.j2.j2.7400MCN0P01R01"
dest: /opt/tsg/tsg-os-provision/templates/conflist.inf.j2
tags: template
when:
- PROFILE_ID == '7400-MCN0-P01R01'
- 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 necessary_plug_list.conf - tsg_9140
template:
src: "{{ role_path }}/templates/necessary_plug_list.conf.j2.9000NPBP01R01"
dest: /home/mesasoft/sapp_run/etc/necessary_plug_list.conf
tags: template
when:
- PROFILE_ID == '9000-NPB-P01R01'
- name: Template the necessary_plug_list.conf - tsg_7400
template:
src: "{{ role_path }}/templates/necessary_plug_list.conf.j2.j2.7400MCN0P01R01"
dest: /opt/tsg/tsg-os-provision/templates/necessary_plug_list.conf.j2
tags: template
when:
- PROFILE_ID == '7400-MCN0-P01R01'
- name: Template the vlan_flipping_map.conf - tsg-9140
template:
src: "{{ role_path }}/templates/vlan_flipping_map.conf.j2.9000NPBP01R01"
dest: /home/mesasoft/sapp_run/etc/vlan_flipping_map.conf
tags: template
when:
- PROFILE_ID == '9000-NPB-P01R01'
- name: Template the vlan_flipping_map.conf - tsg-7400
template:
src: "{{ role_path }}/templates/vlan_flipping_map.conf.j2.j2.7400MCN0P01R01"
dest: /opt/tsg/tsg-os-provision/templates/vlan_flipping_map.conf.j2
tags: template
when:
- PROFILE_ID == '7400-MCN0-P01R01'
- 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: Template the well_known_port.conf
template:
src: "{{ role_path }}/templates/well_known_port.conf.j2"
dest: /opt/tsg/tsg-os-provision/templates/well_known_port.conf
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 slice file to sapp.service.d"
copy:
src: "{{ role_path }}/templates/service_override_slice.conf.j2"
dest: /usr/lib/systemd/system/sapp.service.d/service_override_slice.conf
mode: 0644
- name: "copy env conf to sapp.service.d"
copy:
src: "{{ role_path }}/templates/service_env.conf.j2"
dest: /usr/lib/systemd/system/sapp.service.d/service_env.conf
mode: 0644
- name: "copy fake promisc tools for tera mode - service file and scripts"
copy:
src: "{{ item.src }}"
dest: /opt/tsg/tsg-os-provision/files/
mode: "{{ item.mode }}"
with_items:
- { src: "{{ role_path }}/files/tera_fake_promisc_setup.conf", mode: "0644" }
- { src: "{{ role_path }}/files/tera_fake_promisc_setup.sh", mode: "0755" }
when:
- PROFILE_ID == '7400-MCN0-P01R01'
##################### sapp #####################
- name: "enable sapp"
systemd:
name: sapp
enabled: yes