Return cached data from minions
salt.runners.cache.clear_all(tgt=None, tgt_type='glob', expr_form=None)¶Changed in version 2017.7.0: The expr_form argument has been renamed to tgt_type, earlier
releases must use expr_form.
Clear the cached pillar, grains, and mine data of the targeted minions
CLI Example:
salt-run cache.clear_all
salt.runners.cache.clear_git_lock(role, remote=None, **kwargs)¶New in version 2015.8.2.
Remove the update locks for Salt components (gitfs, git_pillar, winrepo) which use gitfs backend code from salt.utils.gitfs.
Note
Running cache.clear_all will
not include this function as it does for pillar, grains, and mine.
Additionally, executing this function with a role of gitfs is
equivalent to running salt-run fileserver.clear_lock backend=git.
gitfs, git_pillar, or
winrepo)remote value of github
will remove the lock from all github.com remotes.update, checkout, or both ofet (either comma-separated or as a Python list).
New in version 2015.8.8.
CLI Example:
salt-run cache.clear_git_lock git_pillar
salt.runners.cache.clear_grains(tgt=None, tgt_type='glob', expr_form=None)¶Changed in version 2017.7.0: The expr_form argument has been renamed to tgt_type, earlier
releases must use expr_form.
Clear the cached grains data of the targeted minions
CLI Example:
salt-run cache.clear_grains
salt.runners.cache.clear_mine(tgt=None, tgt_type='glob', expr_form=None)¶Changed in version 2017.7.0: The expr_form argument has been renamed to tgt_type, earlier
releases must use expr_form.
Clear the cached mine data of the targeted minions
CLI Example:
salt-run cache.clear_mine
salt.runners.cache.clear_mine_func(tgt=None, tgt_type='glob', clear_mine_func_flag=None, expr_form=None)¶Changed in version 2017.7.0: The expr_form argument has been renamed to tgt_type, earlier
releases must use expr_form.
Clear the cached mine function data of the targeted minions
CLI Example:
salt-run cache.clear_mine_func tgt='*' clear_mine_func_flag='network.interfaces'
salt.runners.cache.clear_pillar(tgt=None, tgt_type='glob', expr_form=None)¶Changed in version 2017.7.0: The expr_form argument has been renamed to tgt_type, earlier
releases must use expr_form.
Clear the cached pillar data of the targeted minions
CLI Example:
salt-run cache.clear_pillar
salt.runners.cache.cloud(tgt, provider=None)¶Return cloud cache data for target.
Note
Only works with glob matching
CLI Example:
salt-run cache.cloud 'salt*'
salt-run cache.cloud glance.example.org provider=openstack
salt.runners.cache.fetch(bank, key, cachedir=None)¶Fetch data from a salt.cache bank.
CLI Example:
salt-run cache.fetch cloud/active/ec2/myec2 myminion cachedir=/var/cache/salt/
salt.runners.cache.flush(bank, key=None, cachedir=None)¶Remove the key from the cache bank with all the key content. If no key is specified remove the entire bank with all keys and sub-banks inside.
CLI Examples:
salt-run cache.flush cloud/active/ec2/myec2 cachedir=/var/cache/salt/
salt-run cache.flush cloud/active/ec2/myec2 myminion cachedir=/var/cache/salt/
salt.runners.cache.grains(tgt=None, tgt_type='glob', **kwargs)¶Changed in version 2017.7.0: The expr_form argument has been renamed to tgt_type, earlier
releases must use expr_form.
Return cached grains of the targeted minions
CLI Example:
salt-run cache.grains
salt.runners.cache.list(bank, cachedir=None)¶Lists entries stored in the specified bank.
CLI Example:
salt-run cache.list cloud/active/ec2/myec2 cachedir=/var/cache/salt/
salt.runners.cache.mine(tgt=None, tgt_type='glob', **kwargs)¶Changed in version 2017.7.0: The expr_form argument has been renamed to tgt_type, earlier
releases must use expr_form.
Return cached mine data of the targeted minions
CLI Example:
salt-run cache.mine
salt.runners.cache.pillar(tgt=None, tgt_type='glob', **kwargs)¶Changed in version 2017.7.0: The expr_form argument has been renamed to tgt_type, earlier
releases must use expr_form.
Return cached pillars of the targeted minions
CLI Example:
salt-run cache.pillar
salt.runners.cache.store(bank, key, data, cachedir=None)¶Lists entries stored in the specified bank.
CLI Example:
salt-run cache.store mycache mykey 'The time has come the walrus said'
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2017.7.2