Create a specific user to launch `lmgrd`
This commit is contained in:
parent
c83bd2decc
commit
1036d20858
|
@ -5,3 +5,4 @@
|
|||
* Install FlexLM dependencies.
|
||||
* Copy `lmgrd` and `lmutil` binaries.
|
||||
* Ensure to have a symlink for `lmgrd` to it's last version.
|
||||
* Create a specific user to launch `lmgrd`.
|
||||
|
|
|
@ -22,6 +22,7 @@ A role to manage Flexlm daemon.
|
|||
* **flexlm__lmgrd_path** : The place to store `lmgrd` bin [default : `/usr/local/bin/lmgrd`].
|
||||
* **flexlm__lmutil_source** : Source of the `lmutil` bin to send [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`].
|
||||
|
||||
## Example Playbook
|
||||
|
||||
|
@ -37,6 +38,7 @@ A role to manage Flexlm daemon.
|
|||
|
||||
This role will :
|
||||
* Copy the `lmgrd` and `lmutil` binaries to the node.
|
||||
* Create a specific user to launch daemon.
|
||||
|
||||
The `lmgrd` and `lmutil` binaries comes from [Mathworks][mathworks download url] in version **flexlm__lmgrd_version**.
|
||||
|
||||
|
|
|
@ -12,3 +12,6 @@ flexlm__lmgrd_source: 'usr/local/bin/lmgrd'
|
|||
flexlm__lmgrd_path: '/usr/local/bin/lmgrd'
|
||||
flexlm__lmutil_source: 'usr/local/bin/lmutil'
|
||||
flexlm__lmutil_path: '/usr/local/bin/lmutil'
|
||||
|
||||
# user
|
||||
flexlm__user_name: 'flexlm'
|
||||
|
|
|
@ -13,29 +13,36 @@
|
|||
|
||||
# }}}
|
||||
|
||||
# user
|
||||
- name: Create flexlm user
|
||||
user:
|
||||
name: '{{ flexlm__user_name }}'
|
||||
createhome: False
|
||||
system: True
|
||||
|
||||
# bin {{{
|
||||
- name: Add lmgrd bin
|
||||
copy:
|
||||
src: '{{ flexlm__lmgrd_source + "." + flexlm__lmgrd_version }}'
|
||||
dest: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
||||
owner: root
|
||||
group: root
|
||||
owner: '{{ flexlm__user_name }}'
|
||||
group: '{{ flexlm__user_name }}'
|
||||
mode: 0755
|
||||
|
||||
- name: Link to the last version of lmgrd
|
||||
file:
|
||||
src: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
||||
dest: '{{ flexlm__lmgrd_path }}'
|
||||
owner: root
|
||||
group: root
|
||||
owner: '{{ flexlm__user_name }}'
|
||||
group: '{{ flexlm__user_name }}'
|
||||
state: link
|
||||
|
||||
- name: Add lmutil bin
|
||||
copy:
|
||||
src: '{{ flexlm__lmutil_source }}'
|
||||
dest: '{{ flexlm__lmutil_path }}'
|
||||
owner: root
|
||||
group: root
|
||||
owner: '{{ flexlm__user_name }}'
|
||||
group: '{{ flexlm__user_name }}'
|
||||
mode: 0755
|
||||
|
||||
# }}}
|
||||
|
|
Loading…
Reference in New Issue