Compare commits
No commits in common. "master" and "v2.1.0" have entirely different histories.
44
CHANGELOG.md
44
CHANGELOG.md
|
@ -1,48 +1,6 @@
|
||||||
## v2.3.2
|
|
||||||
|
|
||||||
### Fix
|
## v2.x
|
||||||
* 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
|
### Fixes
|
||||||
* Add a missing ")" in the handler.
|
* Add a missing ")" in the handler.
|
||||||
|
|
|
@ -15,9 +15,9 @@ A role to manage Flexlm daemon and licence/binaries files.
|
||||||
|
|
||||||
## Role Variables
|
## Role Variables
|
||||||
|
|
||||||
* **flexlm__required_packages** : List of required packages requested as 'flexlm' dependencies [default : `[]`]
|
* **flexlm__required_packages** : List of required packages requested as 'flexlm' dependencies [default : `lsb-core`]
|
||||||
* **flexlm__deploy_state** : The desired state this role should achieve. [default : `present`].
|
* **flexlm__deploy_state** : The desired state this role should achieve. [default : `present`].
|
||||||
* **flexlm__lmgrd_version** : Version of `lmgrd` to use [default : `11.18.1`].
|
* **flexlm__lmgrd_version** : Version of `lmgrd` to use [default : `11.14.0.1`].
|
||||||
* **flexlm__lmgrd_source** : Source of the `lmgrd` bin to send [default : `usr/local/bin/lmgrd`].
|
* **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__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_source** : Source of the `lmutil` bin to send [default : `usr/local/bin/lmutil`].
|
||||||
|
@ -65,7 +65,6 @@ This role will :
|
||||||
* Copy vendor daemon binaries to the host if source is specified.
|
* Copy vendor daemon binaries to the host if source is specified.
|
||||||
* Copy licence file 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 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**.
|
The `lmgrd` and `lmutil` binaries comes from [Mathworks][mathworks download url] in version **flexlm__lmgrd_version**.
|
||||||
|
|
||||||
|
@ -92,7 +91,7 @@ Jérémy Gardais
|
||||||
* [IPR][ipr website] (Institut de Physique de Rennes)
|
* [IPR][ipr website] (Institut de Physique de Rennes)
|
||||||
|
|
||||||
[gogs to github hook]: https://stackoverflow.com/a/21998477
|
[gogs to github hook]: https://stackoverflow.com/a/21998477
|
||||||
[flexlm source]: https://git.ipr.univ-rennes.fr/cellinfo/ansible.flexlm
|
[flexlm source]: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.flexlm
|
||||||
[flexlm github]: https://github.com/ipr-cnrs/flexlm
|
[flexlm github]: https://github.com/ipr-cnrs/flexlm
|
||||||
[wtfpl website]: http://www.wtfpl.net/about/
|
[wtfpl website]: http://www.wtfpl.net/about/
|
||||||
[ipr website]: https://ipr.univ-rennes1.fr/
|
[ipr website]: https://ipr.univ-rennes1.fr/
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
# .. envvar:: flexlm__base_packages [[[
|
# .. envvar:: flexlm__base_packages [[[
|
||||||
#
|
#
|
||||||
# List of base packages to install.
|
# List of base packages to install.
|
||||||
flexlm__required_packages: []
|
flexlm__required_packages:
|
||||||
|
- 'lsb-core'
|
||||||
# ]]]
|
# ]]]
|
||||||
# .. envvar:: flexlm__deploy_state [[[
|
# .. envvar:: flexlm__deploy_state [[[
|
||||||
#
|
#
|
||||||
|
@ -35,7 +36,7 @@ flexlm__deploy_state: 'present'
|
||||||
#
|
#
|
||||||
# A symlink will be create to ``lmgrd`` daemon to have a simpler name.
|
# A symlink will be create to ``lmgrd`` daemon to have a simpler name.
|
||||||
#
|
#
|
||||||
flexlm__lmgrd_version: '11.18.1'
|
flexlm__lmgrd_version: '11.14.0.1'
|
||||||
|
|
||||||
# ]]]
|
# ]]]
|
||||||
# .. envvar:: flexlm__lmgrd_path [[[
|
# .. 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.
|
@ -8,6 +8,3 @@
|
||||||
with_flattened:
|
with_flattened:
|
||||||
- '{{ flexlm__licences }}'
|
- '{{ flexlm__licences }}'
|
||||||
|
|
||||||
- name: systemd daemon reload
|
|
||||||
systemd:
|
|
||||||
daemon_reload: True
|
|
||||||
|
|
|
@ -1,19 +1,14 @@
|
||||||
---
|
|
||||||
|
|
||||||
dependencies: []
|
|
||||||
|
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: "Jérémy Gardais"
|
author: "Jérémy Gardais"
|
||||||
description: "Manage FlexLM daemon"
|
description: "Manage FlexLM daemon"
|
||||||
license: WTFPL
|
license: WTFPL
|
||||||
company: IPR
|
company: IPR
|
||||||
issue_tracker_url: https://git.ipr.univ-rennes.fr/cellinfo/ansible.flexlm/issues
|
issue_tracker_url: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.flexlm/issues
|
||||||
min_ansible_version: 2.9
|
min_ansible_version: 2.4
|
||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- bullseye
|
- stretch
|
||||||
- buster
|
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- system
|
- system
|
||||||
- flexlm
|
- flexlm
|
||||||
|
|
|
@ -3,54 +3,32 @@
|
||||||
#
|
#
|
||||||
# tasks file for flexlm
|
# 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
|
# Manage required system packages [[[1
|
||||||
- name: Ensure required packages are in there desired state
|
- name: Ensure required packages are in there desired state
|
||||||
ansible.builtin.package:
|
package:
|
||||||
name: '{{ flexlm__required_packages | flatten }}'
|
name: '{{ item }}'
|
||||||
state: '{{ "present" if (flexlm__deploy_state == "present") else "absent" }}'
|
state: '{{ "present" if (flexlm__deploy_state == "present") else "absent" }}'
|
||||||
install_recommends: False
|
install_recommends: False
|
||||||
register: flexlm_pkg_result
|
with_flattened:
|
||||||
until: flexlm_pkg_result is success
|
- '{{ flexlm__required_packages }}'
|
||||||
|
|
||||||
# user
|
# user
|
||||||
- name: Create flexlm user
|
- name: Create flexlm user
|
||||||
ansible.builtin.user:
|
user:
|
||||||
name: '{{ flexlm__user_name }}'
|
name: '{{ flexlm__user_name }}'
|
||||||
createhome: False
|
createhome: False
|
||||||
system: True
|
system: True
|
||||||
|
|
||||||
# Create a symlink for /tmp [[[1
|
# Create a symlink for /tmp [[[1
|
||||||
- name: Symlink /usr/tmp
|
- name: Symlink /usr/tmp
|
||||||
ansible.builtin.file:
|
file:
|
||||||
src: /tmp
|
src: /tmp
|
||||||
dest: /usr/tmp
|
dest: /usr/tmp
|
||||||
state: link
|
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
|
# lmgrd and lmutil binaries [[[1
|
||||||
- name: Add lmgrd bin
|
- name: Add lmgrd bin
|
||||||
ansible.builtin.copy:
|
copy:
|
||||||
src: '{{ flexlm__lmgrd_source + "." + flexlm__lmgrd_version }}'
|
src: '{{ flexlm__lmgrd_source + "." + flexlm__lmgrd_version }}'
|
||||||
dest: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
dest: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
||||||
owner: '{{ flexlm__user_name }}'
|
owner: '{{ flexlm__user_name }}'
|
||||||
|
@ -58,7 +36,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: Link to the last version of lmgrd
|
- name: Link to the last version of lmgrd
|
||||||
ansible.builtin.file:
|
file:
|
||||||
src: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
src: '{{ flexlm__lmgrd_path + "." + flexlm__lmgrd_version }}'
|
||||||
dest: '{{ flexlm__lmgrd_path }}'
|
dest: '{{ flexlm__lmgrd_path }}'
|
||||||
owner: '{{ flexlm__user_name }}'
|
owner: '{{ flexlm__user_name }}'
|
||||||
|
@ -66,7 +44,7 @@
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
- name: Add lmutil bin
|
- name: Add lmutil bin
|
||||||
ansible.builtin.copy:
|
copy:
|
||||||
src: '{{ flexlm__lmutil_source }}'
|
src: '{{ flexlm__lmutil_source }}'
|
||||||
dest: '{{ flexlm__lmutil_path }}'
|
dest: '{{ flexlm__lmutil_path }}'
|
||||||
owner: '{{ flexlm__user_name }}'
|
owner: '{{ flexlm__user_name }}'
|
||||||
|
@ -75,7 +53,7 @@
|
||||||
|
|
||||||
# VENDOR and licence [[[1
|
# VENDOR and licence [[[1
|
||||||
- name: Add VENDOR DAEMON
|
- name: Add VENDOR DAEMON
|
||||||
ansible.builtin.copy:
|
copy:
|
||||||
src: '{{ item.bin_src }}'
|
src: '{{ item.bin_src }}'
|
||||||
dest: '{{ item.bin_path | d("/opt/" + item.name + "/bin") }}'
|
dest: '{{ item.bin_path | d("/opt/" + item.name + "/bin") }}'
|
||||||
owner: '{{ flexlm__user_name }}'
|
owner: '{{ flexlm__user_name }}'
|
||||||
|
@ -87,7 +65,7 @@
|
||||||
notify: ['restart flexlm services']
|
notify: ['restart flexlm services']
|
||||||
|
|
||||||
- name: Add licence file
|
- name: Add licence file
|
||||||
ansible.builtin.copy:
|
copy:
|
||||||
src: '{{ (item.lic_src | dirname) + "/" }}' # Need a final "/"
|
src: '{{ (item.lic_src | dirname) + "/" }}' # Need a final "/"
|
||||||
dest: '{{ (item.lic_path | d("/opt/" + item.name + "/etc/licence.lic")) | dirname }}'
|
dest: '{{ (item.lic_path | d("/opt/" + item.name + "/etc/licence.lic")) | dirname }}'
|
||||||
owner: '{{ flexlm__user_name }}'
|
owner: '{{ flexlm__user_name }}'
|
||||||
|
@ -101,22 +79,28 @@
|
||||||
# Manage services [[[1
|
# Manage services [[[1
|
||||||
|
|
||||||
- name: Add systemd unit
|
- name: Add systemd unit
|
||||||
ansible.builtin.template:
|
template:
|
||||||
src: '{{ flexlm__service_unit_content }}'
|
src: '{{ flexlm__service_unit_content }}'
|
||||||
dest: '{{ "/etc/systemd/system/flexlm-" + item.name + ".service" }}'
|
dest: '{{ "/etc/systemd/system/flexlm-" + item.name + ".service" }}'
|
||||||
owner: 'root'
|
owner: 'root'
|
||||||
group: 'root'
|
group: 'root'
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
register: flexlm__register_service
|
||||||
with_flattened:
|
with_flattened:
|
||||||
- '{{ flexlm__licences }}'
|
- '{{ flexlm__licences }}'
|
||||||
when: ( (flexlm__deploy_state == "present") and
|
when: ( (flexlm__deploy_state == "present") and
|
||||||
( item.service | d(True) ))
|
( item.service | d(True) ))
|
||||||
notify: ['systemd daemon reload', 'restart flexlm services']
|
|
||||||
|
- name: Reload systemd daemons
|
||||||
|
command: systemctl daemon-reload
|
||||||
|
notify: ['restart flexlm services']
|
||||||
|
when: ( flexlm__register_service|changed )
|
||||||
|
|
||||||
- name: Manage flexlm services
|
- name: Manage flexlm services
|
||||||
ansible.builtin.service:
|
service:
|
||||||
name: '{{ "flexlm-" + item.name }}'
|
name: '{{ "flexlm-" + item.name }}'
|
||||||
state: '{{ "started" if (flexlm__deploy_state == "present" and (item.service | d(True) | bool)) else "stopped" }}'
|
state: '{{ "started" if (flexlm__deploy_state == "present" and (item.service | d(True) | bool)) else "stopped" }}'
|
||||||
enabled: '{{ item.service | d(True) | bool }}'
|
enabled: '{{ item.service | d(True) | bool }}'
|
||||||
with_flattened:
|
with_flattened:
|
||||||
- '{{ flexlm__licences }}'
|
- '{{ flexlm__licences }}'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
# Specific vars for Debian Stretch
|
|
||||||
|
|
||||||
flexlm__required_packages:
|
|
||||||
- 'lsb-compat'
|
|
Loading…
Reference in New Issue