Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install snap packages with Ansible

Tags:

ansible

I am automating Canonical Kubernetes installation with Ansible. The intallation process required snap to be present on the host.

Is there a standard way to install snap packages with Ansible already?

like image 678
ps-aux Avatar asked Nov 15 '17 10:11

ps-aux


2 Answers

The snap module is available since version 2.8 of Ansible (released May 2019):

https://docs.ansible.com/ansible/latest/modules/snap_module.html#snap-module

The required task will be:

- name: Install conjure-up for Canonical Kubernetes
  snap:
    name: conjure-up
    classic: yes
like image 157
tdaff Avatar answered Sep 28 '22 02:09

tdaff


There is no snap module for ansible yet. You can install snap packages by using command module.

- name: install heroku cli via snap
  command: snap install heroku --classic
like image 22
Pandikunta Anand Reddy Avatar answered Sep 28 '22 03:09

Pandikunta Anand Reddy