1、增加初始化运行环境配置文件的部署脚本
2、修改与运行环境相关的配置文件的template文件模板名字
This commit is contained in:
72
init_runtime/roles/sapp/tasks/main.yml
Normal file
72
init_runtime/roles/sapp/tasks/main.yml
Normal file
@@ -0,0 +1,72 @@
|
||||
---
|
||||
- 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.2.26.fc1a6aa-2.el7.x86_64.rpm
|
||||
state: present
|
||||
|
||||
- name: "install tcpdump_mesa rpms from localhost"
|
||||
yum:
|
||||
name:
|
||||
- /tmp/ansible_deploy/tcpdump_mesa-1.0.2.0c5a950-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.j2"
|
||||
dest: /opt/tsg/init_runtime/roles/sapp/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 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 sapp.service destination server"
|
||||
template:
|
||||
src: "{{ role_path }}/templates/sapp.service.j2"
|
||||
dest: /usr/lib/systemd/system/sapp.service
|
||||
mode: 0755
|
||||
|
||||
- name: "copy memory limit file to sapp.service.d"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/memory.conf"
|
||||
dest: /etc/systemd/system/sapp.service.d/
|
||||
mode: 0644
|
||||
|
||||
0
init_runtime/roles/sapp/templates/.gitkeep
Normal file
0
init_runtime/roles/sapp/templates/.gitkeep
Normal file
Reference in New Issue
Block a user