Add a way to provide vendor daemon for licences
This commit is contained in:
parent
3940d388f1
commit
b4b3631f29
|
@ -1,4 +1,9 @@
|
||||||
|
|
||||||
|
## v1.x
|
||||||
|
|
||||||
|
### Features
|
||||||
|
* Add a way to provide vendor daemon for a licence.
|
||||||
|
|
||||||
## v1.0
|
## v1.0
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
23
README.md
23
README.md
|
@ -24,6 +24,7 @@ A role to manage Flexlm daemon.
|
||||||
* **flexlm__lmutil_path** : The place to store `lmutil` bin [default : `/usr/local/bin/lmutil`].
|
* **flexlm__lmutil_path** : The place to store `lmutil` bin [default : `/usr/local/bin/lmutil`].
|
||||||
* **flexlm__user_name** : Username used to launch `lmgrd` [default : `flexlm`].
|
* **flexlm__user_name** : Username used to launch `lmgrd` [default : `flexlm`].
|
||||||
* **flexlm__licence_file** : Licence file to deserve [default : `/opt/flexlm/VENDOR/licence.lic`].
|
* **flexlm__licence_file** : Licence file to deserve [default : `/opt/flexlm/VENDOR/licence.lic`].
|
||||||
|
* **flexlm__licences** : Lists to manage vendor daemon files [default : `[]`].
|
||||||
* **flexlm__service_manage** : If Licence Manager service should be managed with this role [default : `True`].
|
* **flexlm__service_manage** : If Licence Manager service should be managed with this role [default : `True`].
|
||||||
* **flexlm__service_enabled** : If Licence Manager service should be enable at startup [default : `True`].
|
* **flexlm__service_enabled** : If Licence Manager service should be enable at startup [default : `True`].
|
||||||
* **flexlm__service_name** : Service name [default : `flexlm`].
|
* **flexlm__service_name** : Service name [default : `flexlm`].
|
||||||
|
@ -36,7 +37,7 @@ A role to manage Flexlm daemon.
|
||||||
|
|
||||||
* Manage Flexlm with defaults vars :
|
* Manage Flexlm with defaults vars :
|
||||||
|
|
||||||
``` yml
|
``` yaml
|
||||||
- hosts: serverXYZ
|
- hosts: serverXYZ
|
||||||
roles:
|
roles:
|
||||||
- role: ipr-cnrs.flexlm
|
- role: ipr-cnrs.flexlm
|
||||||
|
@ -44,21 +45,37 @@ A role to manage Flexlm daemon.
|
||||||
|
|
||||||
* Manage Flexlm to provide Intel Fortran :
|
* Manage Flexlm to provide Intel Fortran :
|
||||||
|
|
||||||
``` yml
|
``` yaml
|
||||||
- hosts: intel-lm
|
- hosts: intel-lm
|
||||||
croles:
|
roles:
|
||||||
- role: ipr-cnrs.flexlm
|
- role: ipr-cnrs.flexlm
|
||||||
flexlm__service_working_directory: '/opt/intel/bin'
|
flexlm__service_working_directory: '/opt/intel/bin'
|
||||||
flexlm__licence_file: '/opt/intel/etc/license.lic'
|
flexlm__licence_file: '/opt/intel/etc/license.lic'
|
||||||
flexlm__service_description: 'Licence Manager for Intel Fortran'
|
flexlm__service_description: 'Licence Manager for Intel Fortran'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* Manage Flexlm to provide Matlab Licence and vendor daemon :
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- hosts: matlab-lm
|
||||||
|
roles:
|
||||||
|
- role: ipr-cnrs.flexlm
|
||||||
|
flexlm__service_working_directory: '/opt/matlab/bin'
|
||||||
|
flexlm__licence_file: '/opt/matlab/etc/license.lic'
|
||||||
|
flexlm__service_description: 'Licence Manager for Matlab'
|
||||||
|
flexlm__licences:
|
||||||
|
- name: matlab
|
||||||
|
bin_path: '/opt/matlab/bin'
|
||||||
|
bin_src: '{{ inventory_dir + "/../resources/service/matlab-lm/bin/" }}'
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
This role will :
|
This role will :
|
||||||
* Copy the `lmgrd` and `lmutil` binaries to the client.
|
* Copy the `lmgrd` and `lmutil` binaries to the client.
|
||||||
* Create a specific user to launch daemon.
|
* Create a specific user to launch daemon.
|
||||||
* Set up a systemd service. [Thanks to Kalebo instructions][kalebo instruction flexlm systemd].
|
* Set up a systemd service. [Thanks to Kalebo instructions][kalebo instruction flexlm systemd].
|
||||||
|
* Copy vendor daemon binaries to the host if specified.
|
||||||
|
|
||||||
The `lmgrd` and `lmutil` binaries comes from [Mathworks][mathworks download url] in version **flexlm__lmgrd_version**.
|
The `lmgrd` and `lmutil` binaries comes from [Mathworks][mathworks download url] in version **flexlm__lmgrd_version**.
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,14 @@ flexlm__user_name: 'flexlm'
|
||||||
# licence
|
# licence
|
||||||
flexlm__licence_file: '/opt/flexlm/VENDOR/licence.lic'
|
flexlm__licence_file: '/opt/flexlm/VENDOR/licence.lic'
|
||||||
|
|
||||||
|
# Lists to manage vendor daemon.
|
||||||
|
# flexlm_licences:
|
||||||
|
# - name: matlab
|
||||||
|
# description: 'flexlm Licence Manager for Matlab'
|
||||||
|
# bin_path: '/opt/matlab/bin'
|
||||||
|
# bin_src: '{{ inventory_dir + "/../resources/service/matlab-lm/bin/" }}'
|
||||||
|
flexlm__licences: []
|
||||||
|
|
||||||
# service
|
# service
|
||||||
flexlm__service_manage: True
|
flexlm__service_manage: True
|
||||||
flexlm__service_enabled: True
|
flexlm__service_enabled: True
|
||||||
|
|
|
@ -47,6 +47,20 @@
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
# VENDOR {{{
|
||||||
|
- name: Add VENDOR DAEMON
|
||||||
|
copy:
|
||||||
|
src: '{{ item.bin_src }}'
|
||||||
|
dest: '{{ item.bin_path | d("/opt/" + item.name + "/bin") }}'
|
||||||
|
owner: '{{ flexlm__user_name }}'
|
||||||
|
group: '{{ flexlm__user_name }}'
|
||||||
|
mode: 0754
|
||||||
|
with_flattened:
|
||||||
|
- '{{ flexlm__licences }}'
|
||||||
|
when: (item.bin_src|d())
|
||||||
|
|
||||||
|
# }}}
|
||||||
|
|
||||||
# service {{{
|
# service {{{
|
||||||
|
|
||||||
- name: SERVICE '{{ flexlm__service_name }}' systemd unit
|
- name: SERVICE '{{ flexlm__service_name }}' systemd unit
|
||||||
|
|
Loading…
Reference in New Issue