--- - 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 allow_downgrade: yes vars: packages: - /tmp/ansible_deploy/tfe-4.0.5.348afbc-1.el7.x86_64.rpm - 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 - 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: "deploy qaznet cert" copy: src: "{{ role_path }}/files/qaznet_intermedia.pem" dest: "/home/tsg/tfe/resource/tfe/qaznet_intermedia.pem" - 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 marker: "## {mark} bootstrap tfe" block: | systemctl start tfe-env cd /home/tsg/tfe; ./r2_tfe