|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
-
- {%- load_yaml as master_common %}
- default:
- service: salt-master
- {%- if pillar.salt.get('master', {}).get('source', {}).get('engine', 'pkg') == 'pkg' %}
- install_state: "pkg: salt_master_packages"
- source:
- engine: pkg
- {%- elif pillar.salt.master.source.engine == 'pip' %}
- install_state: "pip: salt_master_packages"
- {%- endif %}
-
- {%- if pillar.salt.get('master', {}).get('source', {}).version is defined %}
- version: {{ pillar.salt.master.source.version }}
- {%- endif %}
- accept_policy: preseed
- bind: {}
- formula: {}
- base_environment: dev
- dir:
- files: /srv/salt/env
- pillar:
- engine: salt
- max_event_size: 100000000
- minion_data_cache: 'localfs'
- {%- endload %}
-
- {%- load_yaml as master_specific %}
- Arch:
- pkgs:
- - salt-zmq
- Debian:
- pkgs:
- - salt-master
- Gentoo:
- pkgs:
- - app-admin/salt
- MacOS:
- pkgs:
- - saltstack
- RedHat:
- pkgs:
- - salt-master
- {%- endload %}
-
- {%- if pillar.salt.master is defined %}
- {%- set raw_master = salt['grains.filter_by'](master_specific, merge=salt['pillar.get']('salt:master')) %}
- {%- set master = salt['grains.filter_by'](master_common, merge=raw_master) %}
- {%- endif %}
-
-
- {%- load_yaml as syndic_defaults %}
- Debian:
- service: salt-syndic
- pkgs:
- - salt-syndic
- RedHat:
- service: salt-syndic
- pkgs:
- - salt-syndic
- {%- endload %}
-
- {%- set syndic = salt['grains.filter_by'](syndic_defaults, merge=salt['pillar.get']('salt:syndic')) %}
-
-
- {%- load_yaml as minion_common %}
- default:
- graph_pkgs:
- - graphviz
- graph_states_pkgs:
- - python-pydot
- - python-yaml
- graph_states: False
- log:
- level: info
- service: salt-minion
- {%- if pillar.salt.get('minion', {}).get('source', {}).get('engine', 'pkg') == 'pkg' %}
- install_state: "pkg: salt_minion_packages"
- source:
- engine: pkg
- {%- elif pillar.salt.minion.source.engine == 'pip' %}
- install_state: "pip: salt_minion_packages"
- {%- endif %}
-
- {%- if pillar.salt.get('minion', {}).get('source', {}).version is defined %}
- version: {{ pillar.salt.minion.source.version }}
- {%- endif %}
- max_event_size: 100000000
- {%- endload %}
-
- {%- load_yaml as minion_specific %}
- Arch:
- pkgs:
- - salt-zmq
- Debian:
- pkgs:
- - salt-minion
- dependency_pkgs:
- - python-m2crypto
- - python-psutil
- - python-yaml
- dependency_pkgs_pip:
- - PyYAML
- - M2Crypto
- - psutil
- cert_pkgs:
- - ca-certificates
- Gentoo:
- pkgs:
- - app-admin/salt
- MacOS:
- pkgs:
- - saltstack
- RedHat:
- pkgs:
- - salt-minion
- dependency_pkgs:
- - m2crypto
- - psutils
- - PyYAML
- dependency_pkgs_pip:
- - PyYAML
- - M2Crypto
- - psutil
- cert_pkgs:
- - ca-certificates
- {%- endload %}
-
- {%- if pillar.salt.minion is defined %}
- {%- set raw_minion = salt['grains.filter_by'](minion_specific, merge=salt['pillar.get']('salt:minion')) %}
- {%- set minion = salt['grains.filter_by'](minion_common, merge=raw_minion) %}
-
- {%- if pillar.salt.minion.proxy_minion is defined %}
- {% set proxy_minion = salt['grains.filter_by']({
- 'Debian': {
- 'napalm_pkgs': ['python-pip', 'libxml2-dev', 'libxslt1-dev', 'zlib1g-dev'],
- 'napalm_pip_pkgs': ['napalm', 'oauth']
- },
- 'RedHat': {
- 'napalm_pkgs': ['libxml2-dev', 'libxslt1-dev', 'zlib1g-dev']
- },
- }, merge=pillar.salt.minion.get('proxy_minion', {})) %}
- {%- endif %}
-
- {%- endif %}
-
-
- {%- load_yaml as api_common %}
- default:
- pkgs:
- - salt-api
- service: salt-api
- {%- endload %}
-
- {%- set api = salt['grains.filter_by'](api_common, merge=salt['pillar.get']('salt:api')) %}
-
- {%- load_yaml as control_common %}
- default:
- cloud_pips:
- - apache-libcloud
- - netaddr
- cloud_pkgs:
- - python-netaddr
- - python-libcloud
- virt_pips:
- - libvirt-python
- maas_pkgs:
- - python-maas-client
- cluster: {}
- {%- endload %}
-
- {%- load_yaml as control_specific %}
- Debian:
- virt_pkgs:
- - libvirt-dev
- - pkg-config
- {% if grains.oscodename == 'trusty' %}
- - libguestfs-tools
- {% endif %}
-
- RedHat:
- virt_pkgs:
- - libvirt-dev
- - pkg-config
- {%- endload %}
-
- {%- if pillar.salt.control is defined %}
- {%- set raw_control = salt['grains.filter_by'](control_specific, merge=salt['pillar.get']('salt:control')) %}
- {%- set control = salt['grains.filter_by'](control_common, merge=raw_control) %}
- {%- endif %}
|