Skip to content
Snippets Groups Projects
Commit 339adddf authored by Raphaël Hertzog's avatar Raphaël Hertzog
Browse files

Add new “salt.pkgrepo” state

This state enables the official saltstack package repository in order to
always benefit from the latest version. This state currently only works on
Debian and Ubuntu, and aims to implement the installation recommendations
of the official documentation:
http://docs.saltstack.com/en/latest/topics/installation/index.html
parent c8c0781e
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,20 @@ Configure pillar data under salt:ssh_roster to feed the template.
Install a minion and configure it in `standalone mode
<docs.saltstack.com/en/latest/topics/tutorials/standalone_minion.html>`_.
``salt.pkgrepo``
----------------
Enable the official saltstack package repository in order to always
benefit from the latest version. This state currently only works on Debian
and Ubuntu, and aims to implement the `installation recommendations of the
official documentation
<http://docs.saltstack.com/en/latest/topics/installation/index.html#platform-specific-installation-instructions>`_.
``salt.pkgrepo.absent``
-----------------------
Undo the effects of ``salt.pkgrepo``.
``Configuration``
=================
Every option available in the templates can be set in pillar. Settings under 'salt' will be overridden by more specific settings under ``salt['master']``, ``salt['minion']`` or ``salt['cloud']``
......
include:
- .{{ grains['os']|lower }}.absent
drop-saltstack-pkgrepo:
file.absent:
- name: /etc/apt/sources.list.d/saltstack.list
drop-saltstack-apt-key:
file.absent:
- name: /etc/apt/trusted.gpg.d/saltstack.gpg
saltstack-apt-key:
file.managed:
- name: /etc/apt/trusted.gpg.d/saltstack.gpg
- source: salt://salt/pkgrepo/debian/saltstack.gpg
- user: root
- group: root
- mode: 644
saltstack-pkgrepo:
file.managed:
- name: /etc/apt/sources.list.d/saltstack.list
- source: salt://salt/pkgrepo/debian/sources.list
- user: root
- group: root
- mode: 644
- template: jinja
- require:
- file: saltstack-apt-key
# Order: 1 because we can't put a require_in on "pkg: salt-{master,minion}"
# because we don't know if they are used.
- order: 1
File added
# saltstack
deb http://debian.saltstack.com/debian {{ grains['oscodename'] }}-saltstack main
include:
- .{{ grains['os']|lower }}
drop-saltstack-pkgrepo:
pkgrepo.absent:
- ppa: saltstack/salt
saltstack-pkgrepo:
pkgrepo.managed:
- ppa: saltstack/salt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment