/srv/salt/service/nfs.sls
rpcbind: service.running: - enable: True #开机自动启动 # - enable: False nfs: service.running: - enable: True - require: - service: rpcbind在命令行执行如下
salt '10.0.10.100' state.sls service.nfs
或命令行直接执行如下
salt '10.0.10.100' service.stop rpcbind
/srv/salt/service/nfs.sls
rpcbind: service.dead: - enable: True # - enable: False nfs: service.dead: - enable: False # - enable: True - require: - service: rpcbind # - reload: True
在命令行执行如下
salt '10.0.10.100' state.sls service.nfs
或命令行直接执行如下
salt '10.0.10.100' service.stop rpcbind
/srv/salt/service/rpcbind.sls
rpcbind: service.enabled: - name: rpcbind
在命令行执行如下
salt '10.0.10.100' state.sls service.rpcbind
/srv/salt/service/rpcbind.sls
rpcbind:
service.disabled:
- name: rpcbind
在命令行执行如下
salt '10.0.10.100' state.sls service.rpcbind
salt '10.0.10.100' service.available sshd
salt '10.0.10.100' service.get_all
salt '10.0.10.100' service.reload <service name>
salt '10.0.10.100' service.restart <service name>
salt '10.0.10.100' service.status <service name>