浏览代码

Merge pull request #40 from jacksoncage/salt-syndic

Added functionality to state for salt syndic daemon
master
Forrest 10 年前
父节点
当前提交
760fa3ccdb
共有 3 个文件被更改,包括 36 次插入8 次删除
  1. +5
    -0
      README.rst
  2. +16
    -8
      salt/package-map.jinja
  3. +15
    -0
      salt/syndic.sls

+ 5
- 0
README.rst 查看文件

@@ -25,6 +25,11 @@ Install a minion

Install a master.

``salt.syndic``
---------------

Install a syndic.

``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'] or salt['minion']

+ 16
- 8
salt/package-map.jinja 查看文件

@@ -1,20 +1,28 @@
{% set package_table = {
'Debian': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion'},
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic'},
'Ubuntu': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion'},
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic'},
'CentOS': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion'},
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic'},
'Amazon': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion'},
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic'},
'Fedora': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion'},
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic'},
'RedHat': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion'},
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic'},
'Gentoo': {'salt-master': 'app-admin/salt',
'salt-minion': 'app-admin/salt'},
'salt-minion': 'app-admin/salt',
'salt-syndic': 'app-admin/salt'},
'Arch': {'salt-master': 'salt',
'salt-minion': 'salt'}
'salt-minion': 'salt',
'salt-syndic': 'salt'}
} %}

{% if 'package_table' in pillar %}

+ 15
- 0
salt/syndic.sls 查看文件

@@ -0,0 +1,15 @@
{% from "salt/package-map.jinja" import pkgs with context %}

include:
- salt.master

salt-syndic:
pkg.installed:
- name: {{ pkgs['salt-syndic'] }}
service:
- running
- require:
- service: salt-master
- watch:
- pkg: salt-master
- file: /etc/salt/master

正在加载...
取消
保存