Compare commits
20 Commits
Author | SHA1 | Date |
---|---|---|
|
659b2b04ac | |
|
f71f77d10a | |
|
edd21486f8 | |
|
c0a911d5df | |
|
c089beb8fe | |
|
51adb58540 | |
|
8a8a9ddd72 | |
|
1ee35d9ea4 | |
|
424dc5d8ee | |
|
212ea834b5 | |
|
46422ee402 | |
|
6952eeeb16 | |
|
bc33b60bda | |
|
9c8c181e70 | |
|
f85fd58bad | |
|
67b3cbc635 | |
|
fbb6814ce8 | |
|
c6e53f30d9 | |
|
f7f230589b | |
|
a8a6192cdc |
49
CHANGELOG.md
49
CHANGELOG.md
|
@ -1,3 +1,52 @@
|
|||
## v2.3.2
|
||||
|
||||
### Fix
|
||||
* Use flatten to manage packages list.
|
||||
* Prefix module with "ansible.builtin.".
|
||||
|
||||
## v2.3.1
|
||||
### Enhancements
|
||||
* Works with Debian Bullseye.
|
||||
|
||||
## v2.3.0
|
||||
### Enhancements
|
||||
* Upgrade lmgrd and lmutil daemon to version 11.18.1.
|
||||
* Remove old 11.14.0 version of lmgrd.
|
||||
|
||||
## v2.2.0
|
||||
|
||||
### Enhancements
|
||||
* Ensure to install requirements on Debian Stretch.
|
||||
* Empty requirements packages by default cause `lsb-compat` is no longer available on Debian Buster.
|
||||
* Ensure lib64 ld-linux symlinks exists.
|
||||
* Now works with Debian Buster.
|
||||
|
||||
## v2.1.4
|
||||
### Enhancements
|
||||
* Upgrade lmgrd and lmutil daemon to version 11.16.2.1.
|
||||
|
||||
## v2.1.3
|
||||
|
||||
### Enhancements
|
||||
* Use to_nice_json to manage packages list.
|
||||
|
||||
## v2.1.2
|
||||
|
||||
* Fix E405 Remote package tasks should have a retry.
|
||||
* Fix E303 systemctl used in place of systemd module.
|
||||
* Fix E503 Tasks that run when changed should likely be handlers. Daemon_reload moved to handlers file.
|
||||
|
||||
## v2.1.1
|
||||
|
||||
### Fixes
|
||||
* Fix some warnings from ansible-lint.
|
||||
* Set empty dependencies line to fix Galaxy warning.
|
||||
|
||||
## v2.1
|
||||
|
||||
### Fixes
|
||||
* Add a missing ")" in the handler.
|
||||
* Create a symlink (/usr/tmp) to /tmp to avoid error (fix #2).
|
||||
|
||||
## v2.0
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ A role to manage Flexlm daemon and licence/binaries files.
|
|||
|
||||
## Role Variables
|
||||
|
||||
* **flexlm__required_packages** : List of required packages requested as 'flexlm' dependencies [default : `lsb-core`]
|
||||
* **flexlm__required_packages** : List of required packages requested as 'flexlm' dependencies [default : `[]`]
|
||||
* **flexlm__deploy_state** : The desired state this role should achieve. [default : `present`].
|
||||
* **flexlm__lmgrd_version** : Version of `lmgrd` to use [default : `11.14.0.1`].
|
||||
* **flexlm__lmgrd_version** : Version of `lmgrd` to use [default : `11.18.1`].
|
||||
* **flexlm__lmgrd_source** : Source of the `lmgrd` bin to send [default : `usr/local/bin/lmgrd`].
|
||||
* **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`].
|
||||
|
@ -64,6 +64,8 @@ This role will :
|
|||
* Set up a systemd service (flexlm-item.name). [Thanks to Kalebo instructions][kalebo instruction flexlm systemd].
|
||||
* Copy vendor daemon binaries to the host if source is specified.
|
||||
* Copy licence file to the host if source is specified.
|
||||
* Create a symlink (/usr/tmp) to /tmp to avoid error.
|
||||
* Create a symlinks to ld-linux librairies.
|
||||
|
||||
The `lmgrd` and `lmutil` binaries comes from [Mathworks][mathworks download url] in version **flexlm__lmgrd_version**.
|
||||
|
||||
|
@ -90,7 +92,7 @@ Jérémy Gardais
|
|||
* [IPR][ipr website] (Institut de Physique de Rennes)
|
||||
|
||||
[gogs to github hook]: https://stackoverflow.com/a/21998477
|
||||
[flexlm source]: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.flexlm
|
||||
[flexlm source]: https://git.ipr.univ-rennes.fr/cellinfo/ansible.flexlm
|
||||
[flexlm github]: https://github.com/ipr-cnrs/flexlm
|
||||
[wtfpl website]: http://www.wtfpl.net/about/
|
||||
[ipr website]: https://ipr.univ-rennes1.fr/
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
# .. envvar:: flexlm__base_packages [[[
|
||||
#
|
||||
# List of base packages to install.
|
||||
flexlm__required_packages:
|
||||
- 'lsb-core'
|
||||
flexlm__required_packages: []
|
||||
# ]]]
|
||||
# .. envvar:: flexlm__deploy_state [[[
|
||||
#
|
||||
|
@ -36,7 +35,7 @@ flexlm__deploy_state: 'present'
|
|||
#
|
||||
# A symlink will be create to ``lmgrd`` daemon to have a simpler name.
|
||||
#
|
||||
flexlm__lmgrd_version: '11.14.0.1'
|
||||
flexlm__lmgrd_version: '11.18.1'
|
||||
|
||||
# ]]]
|
||||
# .. envvar:: flexlm__lmgrd_path [[[
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -3,8 +3,11 @@
|
|||
- name: restart flexlm services
|
||||
service:
|
||||
name: '{{ "flexlm-" + item.name }}'
|
||||
state: '{{ "restarted" if (flexlm__deploy_state == "present" and (item.service | d(True) | bool) else "stopped" }}'
|
||||
state: '{{ "restarted" if (flexlm__deploy_state == "present" and (item.service | d(True) | bool)) else "stopped" }}'
|
||||
enabled: '{{ item.service | d(True) | bool }}'
|
||||
with_flattened:
|
||||
- '{{ flexlm__licences }}'
|
||||
|
||||
- name: systemd daemon reload
|
||||
systemd:
|
||||
daemon_reload: True
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
---
|
||||
|
||||
dependencies: []
|
||||
|
||||
galaxy_info:
|
||||
author: "Jérémy Gardais"
|
||||
description: "Manage FlexLM daemon"
|
||||
license: WTFPL
|
||||
company: IPR
|
||||
issue_tracker_url: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.flexlm/issues
|
||||
min_ansible_version: 2.4
|
||||
issue_tracker_url: https://git.ipr.univ-rennes.fr/cellinfo/ansible.flexlm/issues
|
||||
min_ansible_version: 2.9
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- stretch
|
||||
- bullseye
|
||||
- buster
|
||||
galaxy_tags:
|
||||
- system
|
||||
- flexlm
|
||||
|
|
|
@ -3,25 +3,54 @@
|
|||
#
|
||||
# tasks file for flexlm
|
||||
|
||||
# Load vars [[[1
|
||||
- name: Load specific OS vars
|
||||
ansible.builtin.include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- files:
|
||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
|
||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}.yml"
|
||||
- "{{ ansible_distribution_release }}.yml"
|
||||
- "{{ ansible_distribution|lower }}.yml"
|
||||
- "{{ ansible_os_family|lower }}.yml"
|
||||
skip: true
|
||||
|
||||
# Manage required system packages [[[1
|
||||
- name: Ensure required packages are in there desired state
|
||||
package:
|
||||
name: '{{ item }}'
|
||||
ansible.builtin.package:
|
||||
name: '{{ flexlm__required_packages | flatten }}'
|
||||
state: '{{ "present" if (flexlm__deploy_state == "present") else "absent" }}'
|
||||
install_recommends: False
|
||||
with_flattened:
|
||||
- '{{ flexlm__required_packages }}'
|
||||
register: flexlm_pkg_result
|
||||
until: flexlm_pkg_result is success
|
||||
|
||||
# user
|
||||
- name: Create flexlm user
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: '{{ flexlm__user_name }}'
|
||||
createhome: False
|
||||
system: True
|
||||
|
||||
# Create a symlink for /tmp [[[1
|
||||
- name: Symlink /usr/tmp
|
||||
ansible.builtin.file:
|
||||
src: /tmp
|
||||
dest: /usr/tmp
|
||||
state: link
|
||||
|
||||
# Create a symlink for libs [[[1
|
||||
- name: Symlinks to /lib64/ld-linux-x86-64.so.2
|
||||
ansible.builtin.file:
|
||||
src: /lib64/ld-linux-x86-64.so.2
|
||||
dest: '{{ item }}'
|
||||
state: link
|
||||
with_items:
|
||||
- /lib64/ld-lsb-x86-64.so.2
|
||||
- /lib64/ld-lsb-x86-64.so.3
|
||||
|
||||
# lmgrd and lmutil binaries [[[1
|
||||
- name: Add lmgrd bin
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: '{{ flexlm__lmgrd_source + "." + flexlm__lmgrd_version }}'
|
||||
dest: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
||||
owner: '{{ flexlm__user_name }}'
|
||||
|
@ -29,7 +58,7 @@
|
|||
mode: 0755
|
||||
|
||||
- name: Link to the last version of lmgrd
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
src: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
||||
dest: '{{ flexlm__lmgrd_path }}'
|
||||
owner: '{{ flexlm__user_name }}'
|
||||
|
@ -37,7 +66,7 @@
|
|||
state: link
|
||||
|
||||
- name: Add lmutil bin
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: '{{ flexlm__lmutil_source }}'
|
||||
dest: '{{ flexlm__lmutil_path }}'
|
||||
owner: '{{ flexlm__user_name }}'
|
||||
|
@ -46,7 +75,7 @@
|
|||
|
||||
# VENDOR and licence [[[1
|
||||
- name: Add VENDOR DAEMON
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: '{{ item.bin_src }}'
|
||||
dest: '{{ item.bin_path | d("/opt/" + item.name + "/bin") }}'
|
||||
owner: '{{ flexlm__user_name }}'
|
||||
|
@ -58,8 +87,8 @@
|
|||
notify: ['restart flexlm services']
|
||||
|
||||
- name: Add licence file
|
||||
copy:
|
||||
src: '{{ (item.lic_src | dirname) + "/" }}' # Need a final "/"
|
||||
ansible.builtin.copy:
|
||||
src: '{{ (item.lic_src | dirname) + "/" }}' # Need a final "/"
|
||||
dest: '{{ (item.lic_path | d("/opt/" + item.name + "/etc/licence.lic")) | dirname }}'
|
||||
owner: '{{ flexlm__user_name }}'
|
||||
group: '{{ flexlm__user_name }}'
|
||||
|
@ -72,28 +101,22 @@
|
|||
# Manage services [[[1
|
||||
|
||||
- name: Add systemd unit
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: '{{ flexlm__service_unit_content }}'
|
||||
dest: '{{ "/etc/systemd/system/flexlm-" + item.name + ".service" }}'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
mode: '0644'
|
||||
register: flexlm__register_service
|
||||
with_flattened:
|
||||
- '{{ flexlm__licences }}'
|
||||
when: ( (flexlm__deploy_state == "present") and
|
||||
( item.service | d(True) ))
|
||||
|
||||
- name: Reload systemd daemons
|
||||
command: systemctl daemon-reload
|
||||
notify: ['restart flexlm services']
|
||||
when: ( flexlm__register_service|changed )
|
||||
notify: ['systemd daemon reload', 'restart flexlm services']
|
||||
|
||||
- name: Manage flexlm services
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: '{{ "flexlm-" + item.name }}'
|
||||
state: '{{ "started" if (flexlm__deploy_state == "present" and (item.service | d(True) | bool)) else "stopped" }}'
|
||||
enabled: '{{ item.service | d(True) | bool }}'
|
||||
with_flattened:
|
||||
- '{{ flexlm__licences }}'
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
# Specific vars for Debian Stretch
|
||||
|
||||
flexlm__required_packages:
|
||||
- 'lsb-compat'
|
Loading…
Reference in New Issue