community / community.general / 8.5.0 / module / gio_mime Set default handler for MIME type, for applications using Gnome GIO | "added in version" 7.5.0 of community.general" Authors: Alexei Znamensky (@russoz)community.general.gio_mime (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
This module allows configuring the default handler for a specific MIME type, to be used by applications built with th Gnome GIO API.
- name: Set chrome as the default handler for https community.general.gio_mime: mime_type: x-scheme-handler/https handler: google-chrome.desktop register: result
handler: description: - Default handler will be set for the MIME type. required: true type: str mime_type: description: - MIME type for which a default handler will be set. required: true type: str
handler: description: - The handler set as default. returned: success sample: google-chrome.desktop type: str stderr: description: - The error output of the C(gio) command. returned: failure sample: 'gio: Failed to load info for handler "never-existed.desktop"' type: str stdout: description: - The output of the C(gio) command. returned: success sample: Set google-chrome.desktop as the default for x-scheme-handler/https type: str