Add "paths" parameter for include_vars
As mentionned in the last example on the documentation: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/first_found_lookup.html#examples Fix #5
This commit is contained in:
		
							parent
							
								
									a9d3811432
								
							
						
					
					
						commit
						b9f00ac858
					
				|  | @ -1,9 +1,10 @@ | |||
| ## v1.X.Y | ||||
| ## v1.3.0 | ||||
| 
 | ||||
| ### Fix | ||||
| 
 | ||||
| * Add role_name info in meta. | ||||
| * Set a default mode (0644) in ini_file. | ||||
| * with_first_found fail when ansible_distribution vars file is missing (#5). | ||||
| 
 | ||||
| ### Enhancement | ||||
| 
 | ||||
|  | @ -19,7 +20,7 @@ | |||
| 
 | ||||
| ### Features | ||||
| 
 | ||||
| * Add RHEL8 support (thanks @mjourdan). | ||||
| * Add RHEL8 support (thanks @mjourdan) (#7). | ||||
| * The role also works on Debian Bullseye. | ||||
| 
 | ||||
| ## v1.1.2 | ||||
|  |  | |||
|  | @ -8,8 +8,11 @@ | |||
|   vars: | ||||
|     params: | ||||
|       files: | ||||
|         - "{{ ansible_distribution }}.yml" | ||||
|         - "{{ ansible_os_family }}.yml" | ||||
|         - '{{ ansible_distribution }}.yml' | ||||
|         - '{{ ansible_os_family }}.yml' | ||||
|       paths: | ||||
|         - 'vars' | ||||
| 
 | ||||
| 
 | ||||
| # Manage dependent packages [[[1 | ||||
| - name: Ensure dependent packages are installed | ||||
|  | @ -25,12 +28,13 @@ | |||
| # Manage agent package [[[1 | ||||
| 
 | ||||
| # Specific tasks per OS will be in the include otherwise below | ||||
| - include: "{{ lookup('first_found', params) }}" | ||||
| - name: Include tasks per OS | ||||
|   include: "{{ lookup('first_found', params) }}" | ||||
|   vars: | ||||
|     params: | ||||
|       files: | ||||
|         - "{{ ansible_distribution }}.yml" | ||||
|         - "{{ ansible_os_family }}.yml" | ||||
|         - '{{ ansible_distribution }}.yml' | ||||
|         - '{{ ansible_os_family }}.yml' | ||||
| 
 | ||||
| - name: Ensure fusioninventory-agent package from REPOS | ||||
|   package: | ||||
|  |  | |||
		Reference in New Issue