Provide --dangerous flag when installing a snap with Ansible

219 Views Asked by At

I'm trying to install Cider music player (https://download.cider.sh/) using the community.general.snap module in Ansible. This package apparently isn't signed, so to install it I need to pass the --dangerous flag to avoid the following signature verification error: error: cannot find signatures with metadata for snap .

The community.general.snap ansible module doesn't have a "dangerous" parameter https://docs.ansible.com/ansible/latest/collections/community/general/snap_module.html , so I tried passing the flag to the "options" parameter assuming it was a boolean option, but I get the same error: error: cannot find signatures with metadata for snap with this task:

- name: Get Cider Installer
  get_url:
    url: https://github.com/ciderapp/cider-releases/releases/download/v1.5.9/cider_1.5.9_amd64.snap
    dest: /tmp/cider_1.5.9_amd64.snap

- name: Install Cider
  become: true
  community.general.snap:
    name: /tmp/cider_1.5.9_amd64.snap
    options:
      dangerous=true

Besides using the ansible.builtin.shell module & simply running snap install /tmp/cider_1.5.9_amd64.snap --dangerous as a shell command, is there a method for providing that --dangerous flag that I'm overlooking?

0

There are 0 best solutions below