2019-06-18 21:24:42 +08:00
|
|
|
---
|
|
|
|
|
- name: "copy tfe program to destination server"
|
|
|
|
|
copy:
|
2019-06-20 16:36:51 +08:00
|
|
|
src: "{{ role_path }}/files/"
|
|
|
|
|
dest: /tmp/ansible_deploy/
|
2019-06-18 21:24:42 +08:00
|
|
|
|
2020-06-22 10:34:56 +08:00
|
|
|
- name: "copy tfe.service to destination server"
|
|
|
|
|
copy:
|
|
|
|
|
src: "{{ role_path }}/files/tfe.service"
|
|
|
|
|
dest: /usr/lib/systemd/system/
|
|
|
|
|
mode: 0755
|
|
|
|
|
|
2019-09-23 11:15:37 +08:00
|
|
|
- name: "install tfe rpms from localhost"
|
2019-06-18 21:24:42 +08:00
|
|
|
yum:
|
2019-09-23 11:15:37 +08:00
|
|
|
name:
|
2020-04-26 02:06:47 +08:00
|
|
|
- /tmp/ansible_deploy/tfe-kmod-v1.0.5.20200408-1dkms.noarch.rpm
|
2020-10-16 10:04:16 +08:00
|
|
|
- /tmp/ansible_deploy/tfe-4.3.12.be94218-1.el7.x86_64.rpm
|
2019-09-23 11:15:37 +08:00
|
|
|
state: present
|
2019-06-22 16:54:10 +08:00
|
|
|
|
|
|
|
|
- name: "template tfe-env config"
|
|
|
|
|
template:
|
2019-09-17 19:28:50 +08:00
|
|
|
src: "{{ role_path }}/templates/tfe-env-config.j2"
|
2019-06-22 16:54:10 +08:00
|
|
|
dest: /etc/sysconfig/tfe-env-config
|
2019-06-21 13:27:23 +08:00
|
|
|
|
|
|
|
|
- name: "template the tfe.conf"
|
|
|
|
|
template:
|
2019-09-17 19:28:50 +08:00
|
|
|
src: "{{ role_path }}/templates/tfe.conf.j2"
|
2019-09-17 17:26:01 +08:00
|
|
|
dest: /opt/tsg/tfe/conf/tfe/tfe.conf
|
2019-06-21 13:27:23 +08:00
|
|
|
|
2020-10-12 18:20:51 +08:00
|
|
|
- name: "template the zlog.conf"
|
|
|
|
|
template:
|
|
|
|
|
src: "{{ role_path }}/templates/zlog.conf.j2"
|
|
|
|
|
dest: /opt/tsg/tfe/conf/tfe/zlog.conf
|
|
|
|
|
|
2019-10-29 14:32:03 +08:00
|
|
|
- name: "template the future.conf"
|
|
|
|
|
template:
|
|
|
|
|
src: "{{ role_path }}/templates/future.conf.j2"
|
|
|
|
|
dest: /opt/tsg/tfe/conf/tfe/future.conf
|
|
|
|
|
|
2019-06-21 13:27:23 +08:00
|
|
|
- name: "template the pangu_pxy.conf"
|
|
|
|
|
template:
|
2019-09-17 19:28:50 +08:00
|
|
|
src: "{{ role_path }}/templates/pangu_pxy.conf.j2"
|
2019-09-17 17:26:01 +08:00
|
|
|
dest: /opt/tsg/tfe/conf/pangu/pangu_pxy.conf
|
2019-06-22 16:54:10 +08:00
|
|
|
|
2020-07-24 16:06:23 +08:00
|
|
|
- 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
|
|
|
|
|
|
2019-10-29 14:32:03 +08:00
|
|
|
- name: "create a override conf - first step, create dir"
|
|
|
|
|
file:
|
|
|
|
|
path: /etc/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: /etc/systemd/system/tfe.service.d/require-mrzcpd.conf
|
|
|
|
|
|
2019-06-22 16:54:10 +08:00
|
|
|
- name: "enable tfe-env"
|
|
|
|
|
systemd:
|
|
|
|
|
name: tfe-env
|
2019-07-01 16:25:00 +06:00
|
|
|
enabled: yes
|
2019-06-22 16:54:10 +08:00
|
|
|
daemon_reload: yes
|
2019-09-17 17:26:01 +08:00
|
|
|
|
|
|
|
|
- name: "enable tfe"
|
|
|
|
|
systemd:
|
|
|
|
|
name: tfe
|
2019-09-17 19:28:50 +08:00
|
|
|
enabled: yes
|
2019-09-17 17:26:01 +08:00
|
|
|
daemon_reload: yes
|