| maintainer: | Alberto Planas <aplanas@suse.com> |
|---|---|
| maturity: | new |
| depends: | None |
| platform: | Linux |
salt.modules.chroot.apply_(root, mods=None, **kwargs)¶Apply an state inside a chroot.
This function will call chroot.highstate or chroot.sls based on the arguments passed to this function. It exists as a more intuitive way of applying states.
For a formal description of the possible parameters accepted in this function, check state.apply_ documentation.
CLI Example:
salt myminion chroot.apply /chroot
salt myminion chroot.apply /chroot stuff
salt myminion chroot.apply /chroot stuff pillar='{"foo": "bar"}'
salt.modules.chroot.call(root, function, *args, **kwargs)¶Executes a Salt function inside a chroot environment.
The chroot does not need to have Salt installed, but Python is required.
CLI Example:
salt myminion chroot.call /chroot test.ping
salt myminion chroot.call /chroot ssh.set_auth_key user key=mykey
salt.modules.chroot.create(root)¶Create a basic chroot environment.
Note that this environment is not functional. The caller needs to install the minimal required binaries, including Python if chroot.call is called.
CLI Example:
salt myminion chroot.create /chroot
salt.modules.chroot.exist(root)¶Return True if the chroot environment is present.
CLI Example:
salt myminion chroot.exist /chroot
salt.modules.chroot.highstate(root, **kwargs)¶Retrieve the state data from the salt master for this minion and execute it inside the chroot.
For a formal description of the possible parameters accepted in this function, check state.highstate documentation.
CLI Example:
salt myminion chroot.highstate /chroot
salt myminion chroot.highstate /chroot pillar='{"foo": "bar"}'
salt.modules.chroot.in_chroot()¶Return True if the process is inside a chroot jail
New in version 3004.
CLI Example:
salt myminion chroot.in_chroot
salt.modules.chroot.sls(root, mods, saltenv='base', test=None, exclude=None, **kwargs)¶Execute the states in one or more SLS files inside the chroot.
sls or id keys. Glob-patterns
may be used to match multiple states.For a formal description of the possible parameters accepted in this function, check state.sls documentation.
CLI Example:
salt '*' chroot.sls /chroot stuff pillar='{"foo": "bar"}'
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 3004.1