Split depend_packages content to 3 vars
This commit is contained in:
		
							parent
							
								
									78b0528362
								
							
						
					
					
						commit
						f7df94a728
					
				|  | @ -3,6 +3,10 @@ | |||
| ### Enhancement | ||||
| 
 | ||||
| * Flatten packages list to allow condition. | ||||
| * Split fusioninventory__agent_depend_packages content to 3 variables (for Debian) | ||||
|   * fusioninventory__agent_depend_packages | ||||
|   * fusioninventory__agent_recommend_packages | ||||
|   * fusioninventory__agent_extra_packages | ||||
| 
 | ||||
| ## v1.3.0 | ||||
| 
 | ||||
|  |  | |||
|  | @ -17,6 +17,8 @@ A role to manage FusionInventory agent installation and configuration. | |||
| 
 | ||||
| * **fusioninventory__agent_version** : The version of Fusioninventory agent to install [default : `2.4-2`]. | ||||
| * **fusioninventory__agent_depend_packages** : List of dependent packages to install. | ||||
| * **fusioninventory__agent_recommend_packages** : List of recommended packages to install. | ||||
| * **fusioninventory__agent_extra_packages** : List of extra packages to install (eg. to allow installation from a .deb file from Ansible). | ||||
| * **fusioninventory__agent_package_url** : The URL used to download deb package for fusioninventory-agent [default : `http://debian.fusioninventory.org/downloads/fusioninventory-agent_{{ fusioninventory__agent_version }}_all.deb` for Debian Stretch only]. | ||||
| * **fusioninventory__agent_deploy_state** : What is the desired state which this role should achieve [default : `present`]. | ||||
| * **fusioninventory__agent_service_name** : The service name to manage [default : `fusioninventory-agent`]. | ||||
|  |  | |||
|  | @ -13,11 +13,13 @@ | |||
|       paths: | ||||
|         - 'vars' | ||||
| 
 | ||||
| 
 | ||||
| # Manage dependent packages [[[1 | ||||
| - name: Ensure dependent packages are installed | ||||
| # Manage fusioninventory related packages [[[1 | ||||
| - name: Ensure related packages are installed | ||||
|   package: | ||||
|     name: '{{ fusioninventory__agent_depend_packages | flatten }}' | ||||
|     name: '{{ (fusioninventory__agent_depend_packages|d([]) + | ||||
|                fusioninventory__agent_recommend_packages|d([]) + | ||||
|                fusioninventory__agent_extra_packages|d([])) | ||||
|           | flatten }}' | ||||
|     state: 'present' | ||||
|   register: pkg_dep_result | ||||
|   until: pkg_dep_result is success | ||||
|  |  | |||
|  | @ -2,10 +2,9 @@ | |||
| # .. vim: foldmarker=[[[,]]]:foldmethod=marker | ||||
| 
 | ||||
| # .. envvar:: fusioninventory__agent_depend_packages | ||||
| # | ||||
| # List of dependent packages to install. | ||||
| 
 | ||||
| # List of dependent packages to install from a deb file | ||||
| fusioninventory__agent_depend_packages: | ||||
|   - 'dmidecode' | ||||
|   - 'fusioninventory-agent' | ||||
|   - 'hdparm' | ||||
|   - 'hwdata' | ||||
|  | @ -29,6 +28,13 @@ fusioninventory__agent_depend_packages: | |||
|   - 'ucf' | ||||
|   - 'usbutils' | ||||
|   - 'usb.ids' | ||||
| 
 | ||||
| # List of recommended packages to install from a deb file | ||||
| fusioninventory__agent_recommend_packages: | ||||
|   - 'dmidecode' | ||||
| 
 | ||||
| # List of packages to be able install a deb file with Ansible | ||||
| fusioninventory__agent_extra_packages: | ||||
|   - 'xz-utils' | ||||
| 
 | ||||
| fusioninventory__agent_packages: | ||||
|  |  | |||
		Reference in New Issue