Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Salt execution

Shulou Source: shulou.com Published: 2022-06-01 05:09:27 10月04日 Update

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

Tags: Advanced entry suggestion situation File Machine status Environment three Lines Service Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple NVidia Xiaomi Docker Microsoft