Salt execution
Saltstack implements yum to install httpd
Vim / etc/salt/master# Open the following three lines 416 file_roots:417 base:418-/ srv/salt save exit mkdir / srv/salt restart service / etc/init.d/salt-master restartcd / srv/saltvim apache.slsapache-install: pkg.installed:-names:-httpd- httpd-devel apache-service: service.running:-name: httpd- enable: True-reload: True save back Exit execution: salt'* 'state.sls apache
Or advanced status execution:
Starting from the entry file, the top.sls must be placed in the base environment:
For example, this is recommended when all machines have to let apache,nginx.
Vim top.slsbase:'*':-apache save exit salt'* 'state.highstate