2
0
Fork 0

Merge branch 'roumano-RHEL' into master

This commit is contained in:
Jeremy Gardais 2020-10-05 12:04:15 +02:00
commit da9a908ecf
8 changed files with 110 additions and 44 deletions

View File

@ -1,3 +1,9 @@
## v1.1.0
### Features
* Add RHEL7 support (thanks @roumano).
## v1.0.3 ## v1.0.3
### Fix ### Fix

View File

@ -13,42 +13,7 @@
# #
fusioninventory__agent_version: '2.4-2' fusioninventory__agent_version: '2.4-2'
# ]]] # ]]]
# .. envvar:: fusioninventory__agent_depend_packages [[[
#
# List of dependent packages to install.
fusioninventory__agent_depend_packages:
- 'dmidecode'
- 'hwdata'
- 'hdparm'
- 'libuniversal-require-perl'
- 'libwww-perl'
- 'libparse-edid-perl'
- 'libproc-daemon-perl'
- 'libfile-which-perl'
- 'libhttp-daemon-perl'
- 'libxml-treepp-perl'
- 'libyaml-perl'
- 'libnet-cups-perl'
- 'libnet-ip-perl'
- 'libdigest-sha-perl'
- 'libjson-pp-perl'
- 'libsocket-getaddrinfo-perl'
- 'libtext-template-perl'
- 'lsb-base'
- 'xz-utils'
# ]]]
# .. envvar:: fusioninventory__agent_package_url [[[
#
# The URL used to download deb package for fusioninventory-agent.
#
# See the official documentation for more informations:
# http://fusioninventory.org/documentation/agent/installation/linux/deb.html
#
fusioninventory__agent_package_url: '{{ "http://debian.fusioninventory.org/downloads/fusioninventory-agent_"+ fusioninventory__agent_version + "_all.deb"
if (ansible_distribution_release in
([ "stretch" ]))
else "" }}'
# ]]]
# .. envvar:: fusioninventory__agent_deploy_state [[[ # .. envvar:: fusioninventory__agent_deploy_state [[[
# #
# What is the desired state which this role should achieve? Possible options: # What is the desired state which this role should achieve? Possible options:

View File

@ -13,6 +13,9 @@ galaxy_info:
- name: Debian - name: Debian
versions: versions:
- stretch - stretch
- name: EL
versions:
- 7
galaxy_tags: galaxy_tags:
- agent - agent
- fusion - fusion

10
tasks/Debian.yml Normal file
View File

@ -0,0 +1,10 @@
---
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
- name: Ensure fusioninventory-agent package from URL
apt:
deb: '{{ fusioninventory__agent_package_url }}'
register: pkg_agent_url_result
until: pkg_agent_url_result is success
when: ((fusioninventory__agent_package_url) and
(fusioninventory__agent_deploy_state == "present"))

11
tasks/RedHat.yml Normal file
View File

@ -0,0 +1,11 @@
---
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
# http://fusioninventory.org/documentation/agent/installation/linux/rhel.html
- name: Add EPEL Repository
yum_repository:
name: Epel
description: EPEL YUM repo
baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
gpgkey: https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}

View File

@ -3,6 +3,12 @@
# #
# tasks file for fusioninventory # tasks file for fusioninventory
- name: Include package list per OS
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}.yml"
- "{{ ansible_os_family }}.yml"
# Manage dependent packages [[[1 # Manage dependent packages [[[1
- name: Ensure dependent packages are installed - name: Ensure dependent packages are installed
package: package:
@ -15,17 +21,16 @@
when: fusioninventory__agent_deploy_state == "present" when: fusioninventory__agent_deploy_state == "present"
# Manage agent package [[[1 # Manage agent package [[[1
- name: Ensure fusioninventory-agent package from URL
apt: # Specific tasks per OS will be in the include otherwise below
deb: '{{ fusioninventory__agent_package_url }}' - include: "{{ item }}"
register: pkg_agent_url_result with_first_found:
until: pkg_agent_url_result is success - "{{ ansible_distribution }}.yml"
when: ((fusioninventory__agent_package_url) and - "{{ ansible_os_family }}.yml"
(fusioninventory__agent_deploy_state == "present"))
- name: Ensure fusioninventory-agent package from REPOS - name: Ensure fusioninventory-agent package from REPOS
package: package:
name: 'fusioninventory-agent' name: '{{ fusioninventory__agent_packages }}'
state: '{{ "present" if (fusioninventory__agent_deploy_state == "present") state: '{{ "present" if (fusioninventory__agent_deploy_state == "present")
else "absent" }}' else "absent" }}'
register: pkg_agent_repo_result register: pkg_agent_repo_result

41
vars/Debian.yml Normal file
View File

@ -0,0 +1,41 @@
---
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
# .. envvar:: fusioninventory__agent_depend_packages [[[
#
# List of dependent packages to install.
fusioninventory__agent_depend_packages:
- 'dmidecode'
- 'hwdata'
- 'hdparm'
- 'libuniversal-require-perl'
- 'libwww-perl'
- 'libparse-edid-perl'
- 'libproc-daemon-perl'
- 'libfile-which-perl'
- 'libhttp-daemon-perl'
- 'libxml-treepp-perl'
- 'libyaml-perl'
- 'libnet-cups-perl'
- 'libnet-ip-perl'
- 'libdigest-sha-perl'
- 'libjson-pp-perl'
- 'libsocket-getaddrinfo-perl'
- 'libtext-template-perl'
- 'lsb-base'
- 'xz-utils'
# ]]]
# .. envvar:: fusioninventory__agent_package_url [[[
#
# The URL used to download deb package for fusioninventory-agent.
#
# See the official documentation for more informations:
# http://fusioninventory.org/documentation/agent/installation/linux/deb.html
#
fusioninventory__agent_package_url: '{{ "http://debian.fusioninventory.org/downloads/fusioninventory-agent_"+ fusioninventory__agent_version + "_all.deb"
if (ansible_distribution_release in
([ "stretch" ]))
else "" }}'
# ]]]
fusioninventory__agent_packages:
- 'fusioninventory-agent'

25
vars/RedHat.yml Normal file
View File

@ -0,0 +1,25 @@
---
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
# .. envvar:: fusioninventory__agent_depend_packages [[[
#
# List of dependent packages to install.
fusioninventory__agent_depend_packages:
- 'dmidecode'
# ]]]
# .. envvar:: fusioninventory__agent_package_url [[[
#
# The URL used to download deb package for fusioninventory-agent.
#
# See the official documentation for more informations:
# http://fusioninventory.org/documentation/agent/installation/linux/deb.html
#
fusioninventory__agent_package_url: '{{ "http://debian.fusioninventory.org/downloads/fusioninventory-agent_"+ fusioninventory__agent_version + "_all.deb"
if (ansible_distribution_release in
([ "stretch" ]))
else "" }}'
# ]]]
fusioninventory__agent_packages:
- 'fusioninventory-agent'
- 'fusioninventory-agent-task-inventory'