2015.8.2 新版功能.
Salt proxy state can be used to deploy, configure and run
a salt-proxy
instance on your minion. Configure proxy settings
on the master side and the state configures and runs salt-proxy
on the remote end.
base:
'p8000':
- p8000
This says that Salt's pillar should load some values for the proxy p8000
from the file /srv/pillar/p8000.sls (if you have not changed your default pillar_roots)
p8000.sls
---------
proxy:
# set proxytype for your proxymodule
proxytype: ssh_sample
host: saltyVM
username: salt
password: badpass
salt-proxy-configure:
salt_proxy.configure_proxy:
- proxyname: p8000
- start: True # start the process if it isn't running
salt-proxy
Example using state.sls
to configure and run salt-proxy
# salt device_minion state.sls salt_proxy
This starts salt-proxy on device_minion
salt-key -y -a p8000
The following keys are going to be accepted:
Unaccepted Keys:
p8000
Key for minion p8000 accepted.
salt p8000 pkg.list_pkgs