diff --git a/deploy_env/group_vars/all.yml b/deploy_env/group_vars/all.yml index cb7719f..e19b8ec 100644 --- a/deploy_env/group_vars/all.yml +++ b/deploy_env/group_vars/all.yml @@ -53,7 +53,7 @@ wannat_global: rpm_files: wangw_rpm_file: "libwangw-1.3.0.bcc9c59-2.el7.x86_64.rpm" - natgw_rpm_file: "wannat_natgw-1.3.3.d7123b3-2.el7.x86_64.rpm" + natgw_rpm_file: "wannat_natgw-1.3.6.29690fe-2.el7.x86_64.rpm" wire_graft_rpm_file: "libwire_graft-1.3.3.e1fe8e4-2.el7.x86_64.rpm" toroad_rpm_file: "toroad-1.2.3.693a647-2.el7.x86_64.rpm" ppp_rpm_file: "ppp-2.4.5-34.el7_7.x86_64.rpm" diff --git a/roles/natgw/files/rpm/wannat_natgw-1.3.3.d7123b3-2.el7.x86_64.rpm b/roles/natgw/files/rpm/wannat_natgw-1.3.3.d7123b3-2.el7.x86_64.rpm deleted file mode 100644 index a7bb381..0000000 Binary files a/roles/natgw/files/rpm/wannat_natgw-1.3.3.d7123b3-2.el7.x86_64.rpm and /dev/null differ diff --git a/roles/natgw/files/rpm/wannat_natgw-1.3.6.29690fe-2.el7.x86_64.rpm b/roles/natgw/files/rpm/wannat_natgw-1.3.6.29690fe-2.el7.x86_64.rpm new file mode 100644 index 0000000..14eb1d8 Binary files /dev/null and b/roles/natgw/files/rpm/wannat_natgw-1.3.6.29690fe-2.el7.x86_64.rpm differ diff --git a/roles/natgw/tasks/main.yml b/roles/natgw/tasks/main.yml index 893b4df..c8223ac 100644 --- a/roles/natgw/tasks/main.yml +++ b/roles/natgw/tasks/main.yml @@ -27,6 +27,12 @@ src: "{{ role_path }}/templates/natgw.conf.j2" dest: /opt/tsg/wannat/natgw/conf/natgw.conf tags: template + +- name: "Template the natgw_log.conf" + template: + src: "{{ role_path }}/templates/natgw_log.conf.j2" + dest: /opt/tsg/wannat/natgw/conf/natgw_log.conf + tags: template - name: "Template the maat compile table info" template: @@ -51,6 +57,12 @@ args: executable: /bin/bash tags: shell + +- name: "enable natgw service" + systemd: + name: natgw + enabled: yes + daemon_reload: yes \ No newline at end of file diff --git a/roles/natgw/templates/natgw.conf.j2 b/roles/natgw/templates/natgw.conf.j2 index 9af6a45..75fdb14 100644 --- a/roles/natgw/templates/natgw.conf.j2 +++ b/roles/natgw/templates/natgw.conf.j2 @@ -1,25 +1,25 @@ [NATGW_COMMON] -plugin_tableinfo_path=./conf/plugin_tableinfo.conf -compile_tableinfo_path=./conf/compile_tableinfo.conf +logger_conf=./conf/natgw_log.conf logger_path=./log/natgw_log -logger_level=30 -max_thread_num=10 -json_cfg_file=./conf/natgw_test.json #0:vxlan;1:socket_test run_type={{wannat_global.natgw.run_type}} - -#0:maat_json;1:maat_redis -config_type={{wannat_global.natgw.config_type}} - #0:nerver;1:LRU cache_overflow_elimination_mode=1 - #0:only conpare country;1:compare country and province location_compare_type=1 country_location={{wannat_global.natgw.country_location}} province_location={{wannat_global.natgw.province_location}} hash_max_elem_num=100000 +[NATGW_MAAT] +maat_logger_path=./log/maat_log +plugin_tableinfo_path=./conf/plugin_tableinfo.conf +compile_tableinfo_path=./conf/compile_tableinfo.conf +max_thread_num=10 +json_cfg_file=./conf/natgw_test.json +#0:maat_json;1:maat_redis +config_type={{wannat_global.natgw.config_type}} + [NATGW_CONVERT] snat_mask_ip=192.168.50.147 wannat_ip={{wannat_global.natgw.wannat_ip}} diff --git a/roles/natgw/templates/natgw_log.conf.j2 b/roles/natgw/templates/natgw_log.conf.j2 new file mode 100644 index 0000000..d3272e1 --- /dev/null +++ b/roles/natgw/templates/natgw_log.conf.j2 @@ -0,0 +1,11 @@ +[global] +default format = "%d(%c), %V, %U, %m%n" +[levels] +DEBUG=10 +INFO=20 +FATAL=30 +[formats] +other = "%d(%c), %V, %F, %U, %m%n" +[rules] +__log_natgw_log.fatal "./log/runtimelog.%d(%F)" +__log_maat_log.fatal "./log/maat.%d(%F)" \ No newline at end of file