Salt: Question: selective caching on the master

Created on 26 Feb 2017  路  4Comments  路  Source: saltstack/salt

Description of Issue/Question

Is it possible to tell the master to ignore some directories when caching the file_roots. I was looking for the files cached on the master using the cp.list_master function and I've noticed all the git objects (as the file_roots is a git repo);

~~~ snip ~~~
    - .git/COMMIT_EDITMSG
    - .git/FETCH_HEAD
    - .git/HEAD
    - .git/ORIG_HEAD
    - .git/config
    - .git/description
    - .git/hooks/applypatch-msg.sample
    - .git/hooks/commit-msg.sample
    - .git/hooks/post-update.sample
    - .git/hooks/pre-applypatch.sample
    - .git/hooks/pre-commit.sample
    - .git/hooks/pre-push.sample
    - .git/hooks/pre-rebase.sample
    - .git/hooks/prepare-commit-msg.sample
    - .git/hooks/update.sample
    - .git/index
    - .git/info/exclude
    - .git/logs/HEAD
~~~ snip ~~~

I was wondering if there's already some feature to be able to exclude .git to be cached, e.g.:

master_cache_exclude:
  base:
    - .git
    - some_file.txt

Thanks,
Mircea

Core Feature File Servers

Most helpful comment

Closing as these options actually exist (shame on me): https://docs.saltstack.com/en/latest/ref/configuration/master.html#file-ignore-regex and https://docs.saltstack.com/en/latest/ref/configuration/master.html#file-ignore-glob for whoever will bump in this again.

All 4 comments

@mirceaulinic this is not currently available for file_roots, so I will approve as a feature request. Just to clarify you aren't using gitfs correct just a cloned git repo in your file roots?

Hi @Ch3LL: yes, that's correct my file_rootsdir is a git repo clone, not gitfs.

k thanks for clarifying

Closing as these options actually exist (shame on me): https://docs.saltstack.com/en/latest/ref/configuration/master.html#file-ignore-regex and https://docs.saltstack.com/en/latest/ref/configuration/master.html#file-ignore-glob for whoever will bump in this again.

Was this page helpful?
0 / 5 - 0 ratings