Przeglądaj źródła

Add setting to not install packages

If you are installing Salt via git/pip, the formula will try to overwrite your
install with packaged versions. This setting makes it possible to avoid that.
master
Brian Jackson 9 lat temu
rodzic
commit
924c04c0d8
9 zmienionych plików z 29 dodań i 0 usunięć
  1. +4
    -0
      pillar.example
  2. +2
    -0
      salt/api.sls
  3. +2
    -0
      salt/cloud.sls
  4. +1
    -0
      salt/defaults.yaml
  5. +4
    -0
      salt/master.sls
  6. +4
    -0
      salt/minion.sls
  7. +4
    -0
      salt/ssh.sls
  8. +4
    -0
      salt/standalone.sls
  9. +4
    -0
      salt/syndic.sls

+ 4
- 0
pillar.example Wyświetl plik

@@ -4,6 +4,10 @@ salt:
# and up as it'll wipe out important files that Salt relies on.
clean_config_d_dir: False

# Set this to False to not have the formula install packages (in the case you
# install Salt via git/pip/etc.)
install_packages: True

# to overwrite map.jinja salt packages
lookup:
salt-master: 'salt-master'

+ 2
- 0
salt/api.sls Wyświetl plik

@@ -4,8 +4,10 @@ include:
- salt.master

salt-api:
{% if salt_settings.install_packages %}
pkg.installed:
- name: {{ salt_settings.salt_api }}
{% endif %}
service.running:
- name: {{ salt_settings.api_service }}
- require:

+ 2
- 0
salt/cloud.sls Wyświetl plik

@@ -20,6 +20,7 @@ apache-libcloud:
- require:
- pkg: python-pip

{% if salt_settings.install_packages %}
salt-cloud:
pkg.installed:
- name: {{ salt_settings.salt_cloud }}
@@ -29,6 +30,7 @@ salt-cloud:
{% if grains['os_family'] not in ['Debian', 'RedHat'] %}
- pip: crypto
{% endif %}
{% endif %}

{% for folder in salt_settings.cloud.folders %}
{{ folder }}:

+ 1
- 0
salt/defaults.yaml Wyświetl plik

@@ -1,4 +1,5 @@
salt:
install_packages: True
config_path: /etc/salt
minion_service: salt-minion
master_service: salt-master

+ 4
- 0
salt/master.sls Wyświetl plik

@@ -1,8 +1,10 @@
{% from "salt/map.jinja" import salt_settings with context %}

salt-master:
{% if salt_settings.install_packages %}
pkg.installed:
- name: {{ salt_settings.salt_master }}
{% endif %}
file.recurse:
- name: {{ salt_settings.config_path }}/master.d
- template: jinja
@@ -12,5 +14,7 @@ salt-master:
- enable: True
- name: {{ salt_settings.master_service }}
- watch:
{% if salt_settings.install_packages %}
- pkg: salt-master
{% endif %}
- file: salt-master

+ 4
- 0
salt/minion.sls Wyświetl plik

@@ -1,8 +1,10 @@
{% from "salt/map.jinja" import salt_settings with context %}

salt-minion:
{% if salt_settings.install_packages %}
pkg.installed:
- name: {{ salt_settings.salt_minion }}
{% endif %}
file.recurse:
- name: {{ salt_settings.config_path }}/minion.d
- template: jinja
@@ -14,5 +16,7 @@ salt-minion:
- enable: True
- name: {{ salt_settings.minion_service }}
- watch:
{% if salt_settings.install_packages %}
- pkg: salt-minion
{% endif %}
- file: salt-minion

+ 4
- 0
salt/ssh.sls Wyświetl plik

@@ -1,8 +1,10 @@
{% from "salt/map.jinja" import salt_settings with context %}

{% if salt_settings.install_packages %}
ensure salt-ssh is installed:
pkg.installed:
- name: {{ salt_settings.salt_ssh }}
{% endif %}

ensure roster config:
file.managed:
@@ -10,4 +12,6 @@ ensure roster config:
- source: salt://salt/files/roster.jinja
- template: jinja
- require:
{% if salt_settings.install_packages %}
- pkg: ensure salt-ssh is installed
{% endif %}

+ 4
- 0
salt/standalone.sls Wyświetl plik

@@ -1,8 +1,10 @@
{% from "salt/map.jinja" import salt_settings with context %}

salt-minion:
{% if salt_settings.install_packages %}
pkg.installed:
- name: {{ salt_settings.salt_minion }}
{% endif %}
file.recurse:
- name: {{ salt_settings.config_path }}/minion.d
- template: jinja
@@ -14,5 +16,7 @@ salt-minion:
- enable: False
- name: {{ salt_settings.minion_service }}
- require:
{% if salt_settings.install_packages %}
- pkg: salt-minion
{% endif %}
- file: salt-minion

+ 4
- 0
salt/syndic.sls Wyświetl plik

@@ -4,12 +4,16 @@ include:
- salt.master

salt-syndic:
{% if salt_settings.install_packages %}
pkg.installed:
- name: {{ salt_settings.salt_syndic }}
{% endif %}
service:
- running
- require:
- service: {{ salt_settings.syndic_service }}
- watch:
{% if salt_settings.install_packages %}
- pkg: salt-master
{% endif %}
- file: {{ salt_settings.config_path }}/master

Ładowanie…
Anuluj
Zapisz