Browse Source

Merge "Add gitfs support"

pull/74/head
Vasyl Saienko 6 years ago
parent
commit
436cffcff6
3 changed files with 97 additions and 0 deletions
  1. +16
    -0
      README.rst
  2. +59
    -0
      salt/files/master.conf
  3. +22
    -0
      tests/pillar/master_gitfs.sls

+ 16
- 0
README.rst View File

@@ -300,6 +300,22 @@ Enable Windows repository support:
address: https://github.com/saltstack/salt-winrepo-ng
revision: master

Configure a gitfs_remotes resource:

.. code-block:: yaml

salt:
master:
gitfs_remotes:
salt_formula:
url: https://github.com/salt-formulas/salt-formula-salt.git
enabled: true
params:
base: master

Read more about gitfs resource options in the official Salt documentation.


Event/Reactor systems
~~~~~~~~~~~~~~~~~~~~~


+ 59
- 0
salt/files/master.conf View File

@@ -19,6 +19,65 @@ cachedir: {{ master.cachedir }}

state_output: {{ master.get('state_output', 'changes') }}

{%- if master.gitfs_base is defined %}
gitfs_base: {{ master.gitfs_base }}
{%- endif %}
{%- if master.gitfs_root is defined %}
gitfs_root: {{ master.gitfs_root }}
{%- endif %}
{%- if master.gitfs_ssl_verify is defined %}
gitfs_ssl_verify: {{ master.gitfs_ssl_verify }}
{%- endif %}
{%- if master.gitfs_mountpoint is defined %}
gitfs_mountpoint: {{ master.gitfs_mountpoint }}
{%- endif %}
{%- if master.gitfs_user is defined %}
gitfs_user: {{ master.gitfs_user }}
{%- endif %}
{%- if master.gitfs_password is defined %}
gitfs_password: {{ master.gitfs_password }}
{%- endif %}
{%- if master.gitfs_insecure_auth is defined %}
gitfs_insecure_auth: {{ master.gitfs_insecure_auth }}
{%- endif %}
{%- if master.gitfs_pubkey is defined %}
gitfs_pubkey: {{ master.gitfs_pubkey }}
{%- endif %}
{%- if master.gitfs_privkey is defined %}
gitfs_privkey: {{ master.gitfs_privkey }}
{%- endif %}
{%- if master.gitfs_passphrase is defined %}
gitfs_passphrase: {{ master.gitfs_passphrase }}
{%- endif %}
{%- if master.gitfs_refspecs is defined %}
gitfs_refspecs: {{ master.gitfs_refspecs }}
{%- endif %}
{%- if master.gitfs_disable_saltenv_mapping is defined %}
gitfs_disable_saltenv_mapping: {{ master.gitfs_disable_saltenv_mapping }}
{%- endif %}
{%- if master.gitfs_ref_types is defined %}
gitfs_ref_types: {{ master.gitfs_ref_types }}
{%- endif %}
{%- if master.gitfs_update_interval is defined %}
gitfs_update_interval: {{ master.gitfs_update_interval }}
{%- endif %}

{%- if master.gitfs_remotes is defined %}
gitfs_remotes:
{%- for fs, fsparams in master.gitfs_remotes.items() %}
{%- if fsparams.get('enabled', False) %}
{%- if fsparams.params is defined %}
- {{ fsparams.url }}:
{%- for key, value in fsparams.params.iteritems() %}
- {{ key }}: {{ value }}
{%- endfor %}
{%- else %}
- {{ fsparams.url }}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- endif %}

{%- if master.system is defined %}

file_roots:

+ 22
- 0
tests/pillar/master_gitfs.sls View File

@@ -0,0 +1,22 @@
git:
client:
enabled: true
linux:
system:
enabled: true
salt:
master:
enabled: true
command_timeout: 5
worker_threads: 2
base_environment: prd
pillar:
engine: salt
source:
engine: local
gitfs_remotes:
xccdf_benchmarks:
url: https://gerrit.mcp.mirantis.net/oscore-tools/xccdf-benchmarks.git
enabled: true
params:
base: master

Loading…
Cancel
Save