--- - name: Retrieve and parse the contents of /etc/os-release ansible.netcommon.cli_parse: command: cat /etc/os-release parser: name: ansible.netcommon.native os: linux command: cat os-release set_fact: os_release