TSG-15732 TSG-OS适配网络浮动许可证

1.更新aksusbd驱动,并禁用开机自启
    2.更新环境变量HASPUSER_PREFIX的目录,并添加到hasp_monitor.service中
    3.HASPUSER_PREFIX目录下增加默认配置文件hasp_25743.ini
        * 注释 Admin License Manager Server Address(部署时按需配置)
        * 默认禁用广播
    4.hasp_monitor.server只有在TSG-X设备上执行开机自启
This commit is contained in:
luwenpeng
2023-06-30 18:09:31 +08:00
committed by 付明卫
parent 222f846c7e
commit a844427fec
8 changed files with 44 additions and 8 deletions

View File

@@ -1,2 +1,2 @@
[Service]
Environment=HASPUSER_PREFIX=/etc/tsg/licence/
Environment=HASPUSER_PREFIX=/etc/haspuser/

View File

@@ -1 +1 @@
export HASPUSER_PREFIX=/etc/tsg/licence/
export HASPUSER_PREFIX=/etc/haspuser/

View File

@@ -0,0 +1,8 @@
disable_IPv6 = 1
requestlog = 0
errorlog = 0
getinfo_uncached = 1
load_balancing = server
broadcastsearch = 0
#serveraddr = 192.168.41.23
#serveraddr = 192.168.41.22

View File

@@ -1,6 +1,6 @@
- name: "aksusbd rpm install: copy file to device"
copy:
src: '{{ role_path }}/files/aksusbd-8.23-1.x86_64.rpm'
src: '{{ role_path }}/files/aksusbd-8.31-1.x86_64.rpm'
dest: /tmp/ansible_deploy/
- name: "download rpm packages: hasp_tools"
@@ -15,10 +15,15 @@
- name: "aksusbd rpm install: install aksusbd"
yum:
name:
- "/tmp/ansible_deploy/aksusbd-8.23-1.x86_64.rpm"
- "/tmp/ansible_deploy/aksusbd-8.31-1.x86_64.rpm"
state: present
disable_gpg_check: yes
- name: "disable aksusbd.service"
systemd:
name: aksusbd.service
enabled: no
- name: "Get hasp_tools rpm path"
find:
path: /tmp/rpm_download/
@@ -40,13 +45,33 @@
- /usr/lib/systemd/system/hasp_monitor.service
when: runtime_env != 'TSG-X-P0906'
- name: "Create /etc/tsg/licence/ directory if it does not exist"
- name: "Create /usr/lib/systemd/system/hasp_monitor.service.d/ directory if it does not exist"
file:
path: "{{ item }}"
state: directory
mode: '0755'
with_items:
- /etc/tsg/licence/
- /usr/lib/systemd/system/hasp_monitor.service.d
- name: "copy env file to hasp_monitor.service.d"
copy:
src: "{{ role_path }}/templates/service_override_env.conf.j2"
dest: /usr/lib/systemd/system/hasp_monitor.service.d/service_override_env.conf
mode: 0644
- name: "Create /etc/haspuser/ directory if it does not exist"
file:
path: "{{ item }}"
state: directory
mode: '0755'
with_items:
- /etc/haspuser/
- name: "copy hasp_25743.ini to /etc/haspuser/"
copy:
src: "{{ role_path }}/files/hasp_25743.ini"
dest: /etc/haspuser/
mode: 0644
- name: "copy hasp.sh to /etc/profile.d/"
copy:
@@ -58,3 +83,4 @@
systemd:
name: hasp_monitor.service
enabled: yes
when: runtime_env == 'TSG-X-P0906'

View File

@@ -0,0 +1,2 @@
[Service]
Environment=HASPUSER_PREFIX=/etc/haspuser/

View File

@@ -1,3 +1,3 @@
[Service]
Environment="ZLOG_PROFILE_ERROR=/var/log/zlog.error.log"
Environment=HASPUSER_PREFIX=/etc/tsg/licence/
Environment=HASPUSER_PREFIX=/etc/haspuser/

View File

@@ -1,2 +1,2 @@
[Service]
Environment=HASPUSER_PREFIX=/etc/tsg/licence/
Environment=HASPUSER_PREFIX=/etc/haspuser/