ソースを参照

Merge pull request #191 from hemebond/master

Make Debian use pkgrepo.managed
tags/v0.57.0
Forrest 9年前
コミット
d58729e6c1
4個のファイルの変更13行の追加19行の削除
  1. +3
    -1
      salt/map.jinja
  2. +4
    -0
      salt/pkgrepo/debian/absent.sls
  3. +6
    -16
      salt/pkgrepo/debian/init.sls
  4. +0
    -2
      salt/pkgrepo/debian/sources.list

+ 3
- 1
salt/map.jinja ファイルの表示

{## Start with defaults from defaults.yaml ##} {## Start with defaults from defaults.yaml ##}
{% import_yaml "salt/defaults.yaml" as default_settings %} {% import_yaml "salt/defaults.yaml" as default_settings %}


{##
{##
Setup variable using grains['os_family'] based logic, only add key:values here Setup variable using grains['os_family'] based logic, only add key:values here
that differ from whats in defaults.yaml that differ from whats in defaults.yaml
##} ##}
{% set os_family_map = salt['grains.filter_by']({ {% set os_family_map = salt['grains.filter_by']({
'Debian': { 'Debian': {
'pkgrepo': 'deb http://debian.saltstack.com/debian ' + salt['grains.get']('oscodename') + '-saltstack main',
'key_url': 'salt://' + slspath + '/saltstack.gpg',
'libgit2': 'libgit2-22', 'libgit2': 'libgit2-22',
'gitfs': { 'gitfs': {
'pygit2': { 'pygit2': {

+ 4
- 0
salt/pkgrepo/debian/absent.sls ファイルの表示

{% from "salt/map.jinja" import salt_settings with context %}

drop-saltstack-pkgrepo: drop-saltstack-pkgrepo:
pkgrepo.absent:
- name: {{ salt_settings.pkgrepo }}
file.absent: file.absent:
- name: /etc/apt/sources.list.d/saltstack.list - name: /etc/apt/sources.list.d/saltstack.list



+ 6
- 16
salt/pkgrepo/debian/init.sls ファイルの表示

saltstack-apt-key:
file.managed:
- name: /etc/apt/trusted.gpg.d/saltstack.gpg
- source: salt://{{ slspath }}/saltstack.gpg
- user: root
- group: root
- mode: 644
{% from "salt/map.jinja" import salt_settings with context %}


saltstack-pkgrepo: saltstack-pkgrepo:
file.managed:
- name: /etc/apt/sources.list.d/saltstack.list
- source: salt://{{ slspath }}/sources.list
- user: root
- group: root
- mode: 644
- template: jinja
- require:
- file: saltstack-apt-key
pkgrepo.managed:
- humanname: SaltStack Debian Repo
- name: {{ salt_settings.pkgrepo }}
- file: /etc/apt/sources.list.d/saltstack.list
- key_url: {{ salt_settings.key_url }}
# Order: 1 because we can't put a require_in on "pkg: salt-{master,minion}" # Order: 1 because we can't put a require_in on "pkg: salt-{master,minion}"
# because we don't know if they are used. # because we don't know if they are used.
- order: 1 - order: 1

+ 0
- 2
salt/pkgrepo/debian/sources.list ファイルの表示

# saltstack
deb http://debian.saltstack.com/debian {{ grains['oscodename'] }}-saltstack main

読み込み中…
キャンセル
保存