The configuration of jenkins (the role here is only used as an interface, use it to manage the execution of the salt command)
1. Build operations to execute shell scripts (pillar can be configured with flexible parameters)
sls file writing of saltstack
nginx.sls
nginx: file.managed: - source: salt://nginx/{{pillar['project']}}.conf - name: /usr/local/nginx/conf/vhost/{{pillar['project']}}.conf - user: root - group: root - mode: 644 cmd.run: - name: nginx -s reload
source is the source file, and name is the target file pushed to the remote minion server