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
|
|
|
|
|
|
|
|
- name: "install tfe rpms"
|
|
|
|
|
yum:
|
2019-06-21 13:27:23 +08:00
|
|
|
name: "{{ packages }}"
|
2019-06-18 21:24:42 +08:00
|
|
|
state: present
|
2019-09-03 21:04:43 +08:00
|
|
|
allow_downgrade: yes
|
2019-06-20 16:36:51 +08:00
|
|
|
vars:
|
|
|
|
|
packages:
|
2019-07-01 16:25:00 +06:00
|
|
|
- /tmp/ansible_deploy/tfe-4.0.5.348afbc-1.el7.x86_64.rpm
|
2019-09-03 21:04:43 +08:00
|
|
|
|
|
|
|
|
- name: "hotfix tfe program"
|
|
|
|
|
synchronize:
|
|
|
|
|
src: "{{ role_path }}/files/tfe"
|
|
|
|
|
dest: /home/tsg/tfe/bin/tfe
|
|
|
|
|
|
|
|
|
|
#- name: "remove the old tfe-kmod"
|
|
|
|
|
# command: rpm -e tfe-kmod
|
|
|
|
|
|
|
|
|
|
#- name: "delete the tfe_kmod.ko"
|
|
|
|
|
# command: rm -f /lib/modules/5.1.8-1.el7.elrepo.x86_64/extra/tfe_kmod.ko
|
|
|
|
|
|
|
|
|
|
#- name: "reinstall the tfe-kmod"
|
|
|
|
|
# command: rpm -i /tmp/ansible_deploy/tfe-kmod-c498d30-1dkms.noarch.rpm --force
|
2019-06-22 16:54:10 +08:00
|
|
|
|
|
|
|
|
- name: "template tfe-env config"
|
|
|
|
|
template:
|
|
|
|
|
src: "{{ role_path }}/templates/tfe-env-config.j2"
|
|
|
|
|
dest: /etc/sysconfig/tfe-env-config
|
2019-06-21 13:27:23 +08:00
|
|
|
|
|
|
|
|
- name: "template the tfe.conf"
|
|
|
|
|
template:
|
|
|
|
|
src: "{{ role_path }}/templates/tfe.conf.j2"
|
|
|
|
|
dest: /home/tsg/tfe/conf/tfe/tfe.conf
|
|
|
|
|
|
|
|
|
|
- name: "template the pangu_pxy.conf"
|
|
|
|
|
template:
|
|
|
|
|
src: "{{ role_path }}/templates/pangu_pxy.conf.j2"
|
2019-06-22 16:54:10 +08:00
|
|
|
dest: /home/tsg/tfe/conf/pangu/pangu_pxy.conf
|
|
|
|
|
|
2019-09-03 21:04:43 +08:00
|
|
|
- name: "deploy qaznet cert"
|
|
|
|
|
copy:
|
|
|
|
|
src: "{{ role_path }}/files/qaznet_intermedia.pem"
|
|
|
|
|
dest: "/home/tsg/tfe/resource/tfe/qaznet_intermedia.pem"
|
|
|
|
|
|
2019-07-01 16:25:00 +06:00
|
|
|
- name: "start tfe-kmod"
|
2019-06-22 16:54:10 +08:00
|
|
|
modprobe:
|
|
|
|
|
name: tfe_kmod
|
|
|
|
|
state: present
|
|
|
|
|
|
|
|
|
|
- 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-07-01 16:25:00 +06:00
|
|
|
state: restarted
|
|
|
|
|
|
|
|
|
|
- name: "add tfe-kmod to boot"
|
|
|
|
|
template:
|
|
|
|
|
src: "{{ role_path }}/templates/tfe_kmod.conf.j2"
|
|
|
|
|
dest: /etc/modules-load.d/tfe_kmod.conf
|
|
|
|
|
|
|
|
|
|
- name: "bootup tfe"
|
|
|
|
|
blockinfile:
|
|
|
|
|
path: /etc/rc.d/rc.local
|
2019-09-03 21:04:43 +08:00
|
|
|
marker: "## {mark} bootstrap tfe"
|
2019-07-01 16:25:00 +06:00
|
|
|
block: |
|
|
|
|
|
systemctl start tfe-env
|
|
|
|
|
cd /home/tsg/tfe; ./r2_tfe
|