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
solutions-tsg-scripts/roles/tfe/tasks/main.yml
2019-07-01 16:25:00 +06:00

54 lines
1.2 KiB
YAML

---
- name: "copy tfe program to destination server"
copy:
src: "{{ role_path }}/files/"
dest: /tmp/ansible_deploy/
- name: "install tfe rpms"
yum:
name: "{{ packages }}"
state: present
vars:
packages:
- /tmp/ansible_deploy/tfe-4.0.5.348afbc-1.el7.x86_64.rpm
- /tmp/ansible_deploy/tfe-kmod-6ed8c79-1dkms.noarch.rpm
- 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"
dest: /home/tsg/tfe/conf/tfe/tfe.conf
- name: "template the pangu_pxy.conf"
template:
src: "{{ role_path }}/templates/pangu_pxy.conf.j2"
dest: /home/tsg/tfe/conf/pangu/pangu_pxy.conf
- name: "start tfe-kmod"
modprobe:
name: tfe_kmod
state: present
- name: "enable tfe-env"
systemd:
name: tfe-env
enabled: yes
daemon_reload: yes
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
block: |
systemctl start tfe-env
cd /home/tsg/tfe; ./r2_tfe