---
- name: Ensures /home/tsg exists
file: path=/home/tsg state=directory
tags: mkdir
- name: Extract kni.tar.gz
unarchive:
src: "{{ role_path }}/files/kni_20190703.tar.gz"
dest: /home/tsg
tags: extract
- name: Template the kni.conf
template:
src: "{{ role_path }}/templates/kni.conf.j2"
dest: /home/tsg/kni/conf/kni/kni.conf
tags: template
- name: Template the main.conf
src: "{{ role_path }}/templates/main.conf.j2"
dest: /home/tsg/kni/conf/main.conf
- name: bootup sapp
blockinfile:
path: /etc/rc.d/rc.local
marker: "## {mark} bootstrap mrzcpd and kni"
block: |
systemctl start mrzcpd
systemctl start mrtunnat
sleep 15
cd /home/tsg/kni; ./r2