back

apt-repo

Manage extra apt repositories

Overview

  • This module manages the presence of extra apt repositories.

Form

(apt-repo command opts)

Arguments

command

The overall command to execute. Should be one of :present or :absent

:present

Ensure the specified apt repository is present on the machine

:absent

Ensure the specified apt repository is absent on the machine

options

A hashmap of options

Options

OptionDescription
:repo
required true
type string

    The repository line as it appears in an apt source file.

    A ppa description string.

:filename

    The base filename to use when storing the config.

    Only necessary when command is :present.

    When command is :absent the repo lists are searched and all references to the repo are removed.

Examples

Add specified repository into sources list using specified filename.

(apt-repo :present {:repo "deb http://dl.google.com/linux/chrome/deb/ stable main"
                    :filename "google-chrome"})

Install an ubuntu ppa apt source for php packages

(apt-repo :present {:repo "ppa:ondrej/php"})

Remove the ubuntu php ppa

(apt-repo :absent {:repo "ppa:ondrej/php"})