2018-02-23 11:19:33 +01:00
|
|
|
---
|
|
|
|
# tasks file for flexlm
|
|
|
|
|
|
|
|
# package {{{
|
|
|
|
- name: INSTALL FlexLM packages
|
|
|
|
package:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: '{{ flexlm__packages_state }}'
|
|
|
|
install_recommends: False
|
|
|
|
with_flattened:
|
|
|
|
- '{{ flexlm__dependent_packages }}'
|
|
|
|
when: flexlm__packages_manage
|
|
|
|
|
|
|
|
# }}}
|
|
|
|
|
2018-02-23 15:27:53 +01:00
|
|
|
# user
|
|
|
|
- name: Create flexlm user
|
|
|
|
user:
|
|
|
|
name: '{{ flexlm__user_name }}'
|
|
|
|
createhome: False
|
|
|
|
system: True
|
|
|
|
|
2018-02-23 14:36:52 +01:00
|
|
|
# bin {{{
|
2018-02-23 14:32:08 +01:00
|
|
|
- name: Add lmgrd bin
|
|
|
|
copy:
|
|
|
|
src: '{{ flexlm__lmgrd_source + "." + flexlm__lmgrd_version }}'
|
|
|
|
dest: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
2018-02-23 15:27:53 +01:00
|
|
|
owner: '{{ flexlm__user_name }}'
|
|
|
|
group: '{{ flexlm__user_name }}'
|
2018-02-23 14:32:08 +01:00
|
|
|
mode: 0755
|
|
|
|
|
2018-02-23 14:36:52 +01:00
|
|
|
- name: Link to the last version of lmgrd
|
|
|
|
file:
|
|
|
|
src: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
|
|
|
dest: '{{ flexlm__lmgrd_path }}'
|
2018-02-23 15:27:53 +01:00
|
|
|
owner: '{{ flexlm__user_name }}'
|
|
|
|
group: '{{ flexlm__user_name }}'
|
2018-02-23 14:36:52 +01:00
|
|
|
state: link
|
|
|
|
|
2018-02-23 14:32:08 +01:00
|
|
|
- name: Add lmutil bin
|
|
|
|
copy:
|
|
|
|
src: '{{ flexlm__lmutil_source }}'
|
|
|
|
dest: '{{ flexlm__lmutil_path }}'
|
2018-02-23 15:27:53 +01:00
|
|
|
owner: '{{ flexlm__user_name }}'
|
|
|
|
group: '{{ flexlm__user_name }}'
|
2018-02-23 14:32:08 +01:00
|
|
|
mode: 0755
|
|
|
|
|
2018-02-23 14:36:52 +01:00
|
|
|
# }}}
|
|
|
|
|
2018-02-23 15:56:31 +01:00
|
|
|
# service {{{
|
|
|
|
|
2018-02-23 16:22:47 +01:00
|
|
|
- name: SERVICE '{{ flexlm__service_name }}' systemd unit
|
2018-02-23 15:56:31 +01:00
|
|
|
template:
|
|
|
|
src: '{{ flexlm__service_unit_content }}'
|
|
|
|
dest: '{{ flexlm__service_unit_path }}'
|
|
|
|
owner: 'root'
|
|
|
|
group: 'root'
|
|
|
|
mode: '0644'
|
|
|
|
register: flexlm__register_systemd_service
|
2018-02-23 16:22:47 +01:00
|
|
|
notify: ['restart flexlm service']
|
|
|
|
when: flexlm__service_manage
|
|
|
|
|
|
|
|
- name: Reload systemd daemons
|
|
|
|
command: systemctl daemon-reload
|
|
|
|
notify: ['restart flexlm service']
|
|
|
|
when: (flexlm__service_manage and
|
|
|
|
flexlm__register_systemd_service|changed)
|
|
|
|
|
|
|
|
- name: SERVICE manage '{{ flexlm__service_name }}'
|
|
|
|
service:
|
|
|
|
name: '{{ flexlm__service_name }}'
|
|
|
|
state: started
|
|
|
|
enabled: '{{ flexlm__service_enabled }}'
|
2018-02-23 15:56:31 +01:00
|
|
|
when: flexlm__service_manage
|
|
|
|
|
|
|
|
# }}}
|