Fix sid distribution release repositories
On Debian sid, ansible collected the following facts: "ansible_distribution": "Debian", "ansible_distribution_major_version": "n/a", "ansible_distribution_release": "bookworm", "ansible_distribution_version": "n/a", While on debian bullseye (current stable), it collected: "ansible_distribution": "Debian", "ansible_distribution_major_version": "11", "ansible_distribution_release": "bullseye", "ansible_distribution_version": "11.5", We assume that sid will never have a distribution version, so we set the distribution release to 'sid'.
This commit is contained in:
		
							parent
							
								
									aff5c93fe1
								
							
						
					
					
						commit
						86e436f161
					
				|  | @ -22,16 +22,17 @@ | |||
|       # change is always triggered in check mode | ||||
|       when: not ansible_check_mode | ||||
| 
 | ||||
|     - name: Determine distribution name (Debian sid pb) | ||||
|     - name: Determine repo distribution release | ||||
|       ansible.builtin.set_fact: | ||||
|         distribution: "{% if 'n/a' in ansible_distribution_release %}sid{% else %}{{ ansible_distribution_release }}{% endif %}" | ||||
|         repo_distribution_release: >- | ||||
|           {{ 'sid' if 'n/a' in ansible_distribution_version else ansible_distribution_release }} | ||||
| 
 | ||||
|     - name: Setup mariadb repository sourcelist entry | ||||
|       ansible.builtin.copy: | ||||
|         dest: /etc/apt/sources.list.d/mariadb.list | ||||
|         content: | | ||||
|           # Ansible managed | ||||
|           deb {{ mariadb_use_official_repo_url }}/{{ mariadb_use_official_repo_version }}/{{ ansible_distribution | lower() }} {{ distribution }} main | ||||
|           deb {{ mariadb_use_official_repo_url }}/{{ mariadb_use_official_repo_version }}/{{ ansible_distribution | lower() }} {{ repo_distribution_release }} main | ||||
|         owner: root | ||||
|         group: root | ||||
|         mode: "0644" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue