Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
|
659b2b04ac | |
|
f71f77d10a | |
|
edd21486f8 | |
|
c0a911d5df |
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,3 +1,13 @@
|
||||||
|
## 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
|
## v2.3.0
|
||||||
### Enhancements
|
### Enhancements
|
||||||
* Upgrade lmgrd and lmutil daemon to version 11.18.1.
|
* Upgrade lmgrd and lmutil daemon to version 11.18.1.
|
||||||
|
|
|
@ -92,7 +92,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-rennes1.fr/cellinfo/ansible.flexlm
|
[flexlm source]: https://git.ipr.univ-rennes.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/
|
||||||
|
|
|
@ -7,13 +7,13 @@ galaxy_info:
|
||||||
description: "Manage FlexLM daemon"
|
description: "Manage FlexLM daemon"
|
||||||
license: WTFPL
|
license: WTFPL
|
||||||
company: IPR
|
company: IPR
|
||||||
issue_tracker_url: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.flexlm/issues
|
issue_tracker_url: https://git.ipr.univ-rennes.fr/cellinfo/ansible.flexlm/issues
|
||||||
min_ansible_version: 2.9
|
min_ansible_version: 2.9
|
||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
|
- bullseye
|
||||||
- buster
|
- buster
|
||||||
- stretch
|
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- system
|
- system
|
||||||
- flexlm
|
- flexlm
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Load vars [[[1
|
# Load vars [[[1
|
||||||
- name: Load specific OS vars
|
- name: Load specific OS vars
|
||||||
include_vars: "{{ item }}"
|
ansible.builtin.include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- files:
|
- files:
|
||||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
|
||||||
|
@ -17,32 +17,30 @@
|
||||||
|
|
||||||
# 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
|
||||||
package:
|
ansible.builtin.package:
|
||||||
name: '{{ item }}'
|
name: '{{ flexlm__required_packages | flatten }}'
|
||||||
state: '{{ "present" if (flexlm__deploy_state == "present") else "absent" }}'
|
state: '{{ "present" if (flexlm__deploy_state == "present") else "absent" }}'
|
||||||
install_recommends: False
|
install_recommends: False
|
||||||
with_flattened:
|
|
||||||
- '{{ flexlm__required_packages | to_nice_json }}'
|
|
||||||
register: flexlm_pkg_result
|
register: flexlm_pkg_result
|
||||||
until: flexlm_pkg_result is success
|
until: flexlm_pkg_result is success
|
||||||
|
|
||||||
# user
|
# user
|
||||||
- name: Create flexlm user
|
- name: Create flexlm user
|
||||||
user:
|
ansible.builtin.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
|
||||||
file:
|
ansible.builtin.file:
|
||||||
src: /tmp
|
src: /tmp
|
||||||
dest: /usr/tmp
|
dest: /usr/tmp
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
# Create a symlink for libs [[[1
|
# Create a symlink for libs [[[1
|
||||||
- name: Symlinks to /lib64/ld-linux-x86-64.so.2
|
- name: Symlinks to /lib64/ld-linux-x86-64.so.2
|
||||||
file:
|
ansible.builtin.file:
|
||||||
src: /lib64/ld-linux-x86-64.so.2
|
src: /lib64/ld-linux-x86-64.so.2
|
||||||
dest: '{{ item }}'
|
dest: '{{ item }}'
|
||||||
state: link
|
state: link
|
||||||
|
@ -52,7 +50,7 @@
|
||||||
|
|
||||||
# lmgrd and lmutil binaries [[[1
|
# lmgrd and lmutil binaries [[[1
|
||||||
- name: Add lmgrd bin
|
- name: Add lmgrd bin
|
||||||
copy:
|
ansible.builtin.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 }}'
|
||||||
|
@ -60,7 +58,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: Link to the last version of lmgrd
|
- name: Link to the last version of lmgrd
|
||||||
file:
|
ansible.builtin.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 }}'
|
||||||
|
@ -68,7 +66,7 @@
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
- name: Add lmutil bin
|
- name: Add lmutil bin
|
||||||
copy:
|
ansible.builtin.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 }}'
|
||||||
|
@ -77,7 +75,7 @@
|
||||||
|
|
||||||
# VENDOR and licence [[[1
|
# VENDOR and licence [[[1
|
||||||
- name: Add VENDOR DAEMON
|
- name: Add VENDOR DAEMON
|
||||||
copy:
|
ansible.builtin.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 }}'
|
||||||
|
@ -89,7 +87,7 @@
|
||||||
notify: ['restart flexlm services']
|
notify: ['restart flexlm services']
|
||||||
|
|
||||||
- name: Add licence file
|
- name: Add licence file
|
||||||
copy:
|
ansible.builtin.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 }}'
|
||||||
|
@ -103,7 +101,7 @@
|
||||||
# Manage services [[[1
|
# Manage services [[[1
|
||||||
|
|
||||||
- name: Add systemd unit
|
- name: Add systemd unit
|
||||||
template:
|
ansible.builtin.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'
|
||||||
|
@ -116,7 +114,7 @@
|
||||||
notify: ['systemd daemon reload', 'restart flexlm services']
|
notify: ['systemd daemon reload', 'restart flexlm services']
|
||||||
|
|
||||||
- name: Manage flexlm services
|
- name: Manage flexlm services
|
||||||
service:
|
ansible.builtin.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 }}'
|
||||||
|
|
Loading…
Reference in New Issue