Allow to manage the RestartSec parameter of the unit

This commit is contained in:
Jeremy Gardais 2018-02-27 16:07:27 +01:00
parent 4a51da3a96
commit bff4d7a11f
3 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,7 @@
* Add a way to provide vendor daemon binaries and licence file. * Add a way to provide vendor daemon binaries and licence file.
* Manage services for the lists var (flexlm__licences). * Manage services for the lists var (flexlm__licences).
* Allow to manage several licences on a same host (close #1). * Allow to manage several licences on a same host (close #1).
* The **RestartSec** argument for the service can be set, cause some vendor daemon have a timewait greater than 60 seconds.
### Enhancements ### Enhancements
* Set a var to manage the state of the deployment by this role. * Set a var to manage the state of the deployment by this role.

View File

@ -90,7 +90,8 @@ flexlm__service_unit_content: 'etc/systemd/system/flexlm.service.j2'
# bin_src: '{{ inventory_dir + "/../resources/service/matlab-lm/bin/" }}' # bin_src: '{{ inventory_dir + "/../resources/service/matlab-lm/bin/" }}'
# lic_path: '/opt/matlab/etc/licence.lic' # lic_path: '/opt/matlab/etc/licence.lic'
# lic_src: '{{ inventory_dir + "/../resources/hosts/matlab-lm/opt/matlab/etc/licence.lic" }}' # lic_src: '{{ inventory_dir + "/../resources/hosts/matlab-lm/opt/matlab/etc/licence.lic" }}'
# #service: False # service: True
# timewait: 60
# ports: [ '27000', '33188' ] # not used right now # ports: [ '27000', '33188' ] # not used right now
flexlm__licences: [] flexlm__licences: []

View File

@ -10,7 +10,7 @@ WorkingDirectory={{ item.bin_path | d("/opt/" + item.name + "/bin") }}
ExecStart={{ flexlm__lmgrd_path }} -z -c {{ item.lic_path | d("/opt/" + item.name + "/etc/licence.lic") }} ExecStart={{ flexlm__lmgrd_path }} -z -c {{ item.lic_path | d("/opt/" + item.name + "/etc/licence.lic") }}
SuccessExitStatus=15 SuccessExitStatus=15
Restart=always Restart=always
RestartSec=30 RestartSec={{ item.timewait | d(60) | int }}
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target