Skip to content

Commit 2230465

Browse files
Merge pull request #424 from noelmcloughlin/pkgrepo1
refactor(linux): align to template-formula & fixes
2 parents 65a55e7 + 71b4d8a commit 2230465

File tree

13 files changed

+83
-52
lines changed

13 files changed

+83
-52
lines changed

docs/README.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,12 @@ For EL distributions, pygit is installed from packages from `EPEL <https://githu
107107
``salt.pkgrepo``
108108
^^^^^^^^^^^^^^^^
109109

110-
Enable the official saltstack package repository in order to always
111-
benefit from the latest version. This state currently only works on Debian, Ubuntu, RHEL 6/7 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>`_.
110+
It is recommended to use SaltStack repository for Debian, RedHat, and SuSE, to benefit from the latest stable salt release. Refer to official documentation at <http://docs.saltstack.com/en/latest/topics/installation/index.html#platform-specific-installation-instructions>`_.
112111

113-
``salt.pkgrepo.absent``
112+
``salt.pkgrepo.clean``
114113
^^^^^^^^^^^^^^^^^^^^^^^
115114

116-
Undo the effects of ``salt.pkgrepo``.
115+
Undo the effects of ``salt.pkgrepo`` on Debian, RedHat, and SuSE.
117116

118117
``salt.formulas``
119118
^^^^^^^^^^^^^^^^^

salt/pkgrepo/debian/absent.sls

Lines changed: 0 additions & 11 deletions
This file was deleted.

salt/pkgrepo/debian/absent.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
clean.sls

salt/pkgrepo/debian/clean.sls

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
{% from "salt/map.jinja" import salt_settings with context %}
4+
5+
salt-pkgrepo-clean-saltstack-debian:
6+
pkgrepo.absent:
7+
- name: {{ salt_settings.pkgrepo }}
8+
file.absent:
9+
- name: /etc/apt/sources.list.d/saltstack.list
10+
11+
salt-pkgrepo-clean-saltstack-debian-apt-key:
12+
file.absent:
13+
- name: /etc/apt/trusted.gpg.d/saltstack.gpg

salt/pkgrepo/debian/init.sls

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
{% from "salt/map.jinja" import salt_settings with context %}
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
23

3-
saltstack-pkgrepo:
4-
pkgrepo.managed:
5-
- humanname: SaltStack Debian Repo
6-
- name: {{ salt_settings.pkgrepo }}
7-
- file: /etc/apt/sources.list.d/saltstack.list
8-
- key_url: {{ salt_settings.key_url }}
9-
- clean_file: True
10-
# Order: 1 because we can't put a require_in on "pkg: salt-{master,minion}"
11-
# because we don't know if they are used.
12-
- order: 1
4+
include:
5+
- .install

salt/pkgrepo/debian/install.sls

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
{% from "salt/map.jinja" import salt_settings with context %}
4+
5+
salt-pkgrepo-install-saltstack-debian:
6+
pkgrepo.managed:
7+
- humanname: SaltStack Debian Repo
8+
- name: {{ salt_settings.pkgrepo }}
9+
- file: /etc/apt/sources.list.d/saltstack.list
10+
- key_url: {{ salt_settings.key_url }}
11+
- clean_file: True
12+
# Order: 1 because we can't put a require_in on "pkg: salt-{master,minion}"
13+
# because we don't know if they are used.
14+
- order: 1

salt/pkgrepo/redhat/absent.sls

Lines changed: 0 additions & 3 deletions
This file was deleted.

salt/pkgrepo/redhat/absent.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
clean.sls

salt/pkgrepo/redhat/clean.sls

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
salt-pkgrepo-clean-saltstack-redhat:
5+
pkgrepo.absent:
6+
- name: saltstack

salt/pkgrepo/redhat/init.sls

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
{% from "salt/map.jinja" import salt_settings with context %}
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
23

3-
{%- if grains['os']|lower not in ('amazon', 'fedora') %}
4-
saltstack-pkgrepo:
5-
pkgrepo.managed:
6-
- name: saltstack
7-
- humanname: SaltStack repo for RHEL/CentOS $releasever
8-
- baseurl: {{ salt_settings.pkgrepo }}
9-
- enabled: 1
10-
- gpgcheck: 1
11-
- gpgkey: {{ salt_settings.key_url }}
12-
{% endif %}
4+
include:
5+
- .install

0 commit comments

Comments
 (0)