Install Spotify snap in Debian-like systems — Ansible module snap

How to automate the installation of Spotify snap system-wide in Debian-like systems using Ansible module snap.

Luca Berton

--

How to Install Spotify snap on Debian-like systems with Ansible?

I’m going to show you a live demo with some simple Ansible code.

I’m Luca Berton and welcome to today’s episode of Ansible Pilot.

Ansible installs Spotify snap on Debian-like systems

  • `community.general.snap`
  • Manages snaps

Today we are going to talk about the Ansible module `snap`.

The full name is `community.general.snap`, it’s part of `community.general` modules maintained by the Ansible Community.

The purpose of the `snap` module is to Manage snaps in the target system.

Parameters

  • name string — snap name
  • state string — present/absent
  • channel string — “stable”
  • classic boolean — no/yes

Let me summarize the parameters of `snap` module.

The only required is “name”, where you specify the snap name to install or remove.

The parameter “state” specifies if you would like to perform the install action (“present” option) or the remove action (“absent” option).

The parameter “channel” specifies which channel to use, default the “stable” channel.

The parameter “classic” allows the confinement allows a snap to have the same level of access to the system as “classic” packages.

Links

demo

code

---
- name: snap module demo
hosts: all
become: true
gather_facts: false
tasks:
- name: snapd present…

--

--

Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday