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/tfe/tasks/main.yml
2021-06-01 11:32:43 +08:00

87 lines
2.3 KiB
YAML

---
- name: "copy tfe program to destination server"
copy:
src: "{{ role_path }}/files/"
dest: /tmp/ansible_deploy/
- name: "copy tfe.service to destination server"
copy:
src: "{{ role_path }}/files/tfe.service"
dest: /usr/lib/systemd/system/
mode: 0644
- name: "install tfe rpms from localhost"
yum:
name:
- "{{ tfe_rpm_version.tfe }}"
conf_file: "{{ rpm_repo_config_path }}"
state: present
- name: "tfe:copy cert file to device"
copy:
src: '{{ role_path }}/files/tsg_diagnose_ca.pem'
dest: /opt/tsg/tfe/resource/tfe/
- name: "template tfe-env config"
template:
src: "{{ role_path }}/templates/tfe-env-config.j2"
dest: /etc/sysconfig/tfe-env-config
- name: "template the tfe.conf"
template:
src: "{{ role_path }}/templates/tfe.conf.j2.j2"
dest: /opt/tsg/tsg-os-provision/templates/tfe.conf.j2
- name: "template the zlog.conf"
template:
src: "{{ role_path }}/templates/zlog.conf.j2"
dest: /opt/tsg/tfe/conf/tfe/zlog.conf
- name: "template the future.conf"
template:
src: "{{ role_path }}/templates/future.conf.j2"
dest: /opt/tsg/tfe/conf/tfe/future.conf
- name: "template the pangu_pxy.conf"
template:
src: "{{ role_path }}/templates/pangu_pxy.conf.j2.j2"
dest: /opt/tsg/tsg-os-provision/templates/pangu_pxy.conf.j2
- name: "create conf/doh/"
file:
path: /opt/tsg/tfe/conf/doh/
state: directory
- name: "template the doh.conf"
template:
src: "{{ role_path }}/templates/doh.conf.j2"
dest: /opt/tsg/tfe/conf/doh/doh.conf
- name: "create a override conf - first step, create dir"
file:
path: /usr/lib/systemd/system/tfe.service.d/
state: directory
mode: '0755'
- name: "create a override conf - second step, copy a override service file"
template:
src: "{{ role_path }}/templates/require-mrzcpd.conf.j2"
dest: /usr/lib/systemd/system/tfe.service.d/require-mrzcpd.conf
- name: "copy memory limit file to tfe.service.d"
copy:
src: "{{ role_path }}/templates/service_override_memsw_limit.conf.j2"
dest: /usr/lib/systemd/system/tfe.service.d/service_override_memsw_limit.conf
mode: 0644
##################### tfe #####################
- name: "enable tfe-env"
systemd:
name: tfe-env
enabled: yes
- name: "enable tfe"
systemd:
name: tfe
enabled: yes