设为首页 收藏本站
查看: 1248|回复: 0

[经验分享] saltstack部署nginx-IT小二郎

[复制链接]
YunVN网友  发表于 2018-8-1 12:10:12 |阅读模式
[root@salt-master base]# salt 'salt-minion01.contoso.com' state.sls nginx.service test=True  
salt-minion01.contoso.com:
  
----------
  
          ID: pcre-source-install
  
    Function: pkg.installed
  
        Name: zlib-devel
  
      Result: None
  
     Comment: The following packages are set to be installed/updated: zlib-devel
  
     Started: 14:41:07.540210
  
    Duration: 18297.782 ms
  
     Changes:
  
----------
  
          ID: pcre-source-install
  
    Function: pkg.installed
  
        Name: glibc-devel
  
      Result: True
  
     Comment: Package glibc-devel is already installed.
  
     Started: 14:41:25.838187
  
    Duration: 0.536 ms
  
     Changes:
  
----------
  
          ID: pcre-source-install
  
    Function: pkg.installed
  
        Name: gcc
  
      Result: True
  
     Comment: Package gcc is already installed.
  
     Started: 14:41:25.838783
  
    Duration: 0.294 ms
  
     Changes:
  
----------
  
          ID: pcre-source-install
  
    Function: pkg.installed
  
        Name: cmake
  
      Result: True
  
     Comment: Package cmake is already installed.
  
     Started: 14:41:25.839133
  
    Duration: 0.241 ms
  
     Changes:
  
----------
  
          ID: pcre-source-install
  
    Function: pkg.installed
  
        Name: glibc
  
      Result: True
  
     Comment: Package glibc is already installed.
  
     Started: 14:41:25.839432
  
    Duration: 0.241 ms
  
     Changes:
  
----------
  
          ID: pcre-source-install
  
    Function: pkg.installed
  
        Name: zlib
  
      Result: True
  
     Comment: Package zlib is already installed.
  
     Started: 14:41:25.839727
  
    Duration: 0.305 ms
  
     Changes:
  
----------
  
          ID: pcre-source-install
  
    Function: pkg.installed
  
        Name: autoconf
  
      Result: None
  
     Comment: The following packages are set to be installed/updated: autoconf
  
     Started: 14:41:25.840087
  
    Duration: 0.281 ms
  
     Changes:
  
----------
  
          ID: pcre-source-install
  
    Function: pkg.installed
  
        Name: gcc-c++
  
      Result: True
  
     Comment: Package gcc-c++ is already installed.
  
     Started: 14:41:25.840422
  
    Duration: 0.239 ms
  
     Changes:
  
----------
  
          ID: pcre-source-install
  
    Function: pkg.installed
  
        Name: make
  
      Result: True
  
     Comment: Package make is already installed.
  
     Started: 14:41:25.840709
  
    Duration: 0.282 ms
  
     Changes:
  
----------
  
          ID: pcre-source-install
  
    Function: file.managed
  
        Name: /opt/tools/pcre-8.37.tar.gz
  
      Result: None
  
     Comment: The file /opt/tools/pcre-8.37.tar.gz is set to be changed
  
     Started: 14:41:25.888753
  
    Duration: 17.582 ms
  
     Changes:
  
              ----------
  
              newfile:
  
                  /opt/tools/pcre-8.37.tar.gz
  
----------
  
          ID: pcre-source-install
  
    Function: cmd.run
  
        Name: cd /opt/tools/ && tar -zxf pcre-8.37.tar.gz && cd pcre-8.37 && ./configure --prefix=/usr/local/pcre && make && make install
  
      Result: None
  
     Comment: Command "cd /opt/tools/ && tar -zxf pcre-8.37.tar.gz && cd pcre-8.37 && ./configure --prefix=/usr/local/pcre && make && make install" would have been executed
  
     Started: 14:41:25.910768
  
    Duration: 10.909 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: pkg.installed
  
        Name: zlib-devel
  
      Result: None
  
     Comment: The following packages are set to be installed/updated: zlib-devel
  
     Started: 14:41:25.922254
  
    Duration: 2.483 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: pkg.installed
  
        Name: gcc
  
      Result: True
  
     Comment: Package gcc is already installed.
  
     Started: 14:41:25.925010
  
    Duration: 0.926 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: pkg.installed
  
        Name: make
  
      Result: True
  
     Comment: Package make is already installed.
  
     Started: 14:41:25.926183
  
    Duration: 0.975 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: pkg.installed
  
        Name: zlib
  
      Result: True
  
     Comment: Package zlib is already installed.
  
     Started: 14:41:25.927407
  
    Duration: 1.276 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: pkg.installed
  
        Name: openssl
  
      Result: True
  
     Comment: Package openssl is already installed.
  
     Started: 14:41:25.929287
  
    Duration: 1.331 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: pkg.installed
  
        Name: openssl-devel
  
      Result: None
  
     Comment: The following packages are set to be installed/updated: openssl-devel
  
     Started: 14:41:25.930830
  
    Duration: 1.027 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: pkg.installed
  
        Name: automake
  
      Result: None
  
     Comment: The following packages are set to be installed/updated: automake
  
     Started: 14:41:25.931943
  
    Duration: 0.392 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: pkg.installed
  
        Name: autoconf
  
      Result: None
  
     Comment: The following packages are set to be installed/updated: autoconf
  
     Started: 14:41:25.932402
  
    Duration: 0.385 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: pkg.installed
  
        Name: gcc-c++
  
      Result: True
  
     Comment: Package gcc-c++ is already installed.
  
     Started: 14:41:25.932851
  
    Duration: 0.33 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: group.present
  
        Name: nginx
  
      Result: None
  
     Comment: The following group attributes are set to be changed:
  
              gid: 601
  
     Started: 14:41:25.934673
  
    Duration: 0.425 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: user.present
  
        Name: nginx
  
      Result: None
  
     Comment: The following user attributes are set to be changed:
  
              homeDoesNotExist: /home/nginx
  
              gid: 601
  
              fullname: nginx
  
              uid: 601
  
     Started: 14:41:25.943129
  
    Duration: 10.523 ms
  
     Changes:
  
----------
  
          ID: nginx-source-install
  
    Function: file.managed
  
        Name: /opt/tools/nginx-1.6.3.tar.gz
  
      Result: None
  
     Comment: The file /opt/tools/nginx-1.6.3.tar.gz is set to be changed
  
     Started: 14:41:25.953761
  
    Duration: 3.461 ms
  
     Changes:
  
              ----------
  
              newfile:
  
                  /opt/tools/nginx-1.6.3.tar.gz
  
----------
  
          ID: nginx-source-install
  
    Function: cmd.run
  
        Name: cd /opt/tools/ && tar -zxf nginx-1.6.3.tar.gz && mkdir -p /usr/local/nginx/tmp/{client,proxy,fcgi} && cd nginx-1.6.3 && ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_gzip_static_module --http-client-body-temp-path=/usr/local/nginx/tmp/client/ --http-proxy-temp-path=/usr/local/nginx/tmp/proxy/ --http-fastcgi-temp-path=/usr/local/nginx/tmp/fcgi/ --with-poll_module --with-file-aio --with-http_realip_module --with-http_addition_module --with-http_addition_module --with-http_random_index_module --with-http_stub_status_module --http-uwsgi-temp-path=/usr/local/nginx/uwsgi_temp --http-scgi-temp-path=/usr/local/nginx/scgi_temp --with-pcre=/opt/tools/pcre-8.37 && make && make install && chown -R nginx:nginx /usr/local/nginx/
  
      Result: None
  
     Comment: Command "cd /opt/tools/ && tar -zxf nginx-1.6.3.tar.gz && mkdir -p /usr/local/nginx/tmp/{client,proxy,fcgi} && cd nginx-1.6.3 && ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_gzip_static_module --http-client-body-temp-path=/usr/local/nginx/tmp/client/ --http-proxy-temp-path=/usr/local/nginx/tmp/proxy/ --http-fastcgi-temp-path=/usr/local/nginx/tmp/fcgi/ --with-poll_module --with-file-aio --with-http_realip_module --with-http_addition_module --with-http_addition_module --with-http_random_index_module --with-http_stub_status_module --http-uwsgi-temp-path=/usr/local/nginx/uwsgi_temp --http-scgi-temp-path=/usr/local/nginx/scgi_temp --with-pcre=/opt/tools/pcre-8.37 && make && make install && chown -R nginx:nginx /usr/local/nginx/" would have been executed
  
     Started: 14:41:25.958142
  
    Duration: 4.665 ms
  
     Changes:
  
----------
  
          ID: nginx-init
  
    Function: file.managed
  
        Name: /etc/init.d/nginx
  
      Result: None
  
     Comment: The file /etc/init.d/nginx is set to be changed
  
     Started: 14:41:25.963238
  
    Duration: 3.005 ms
  
     Changes:
  
              ----------
  
              newfile:
  
                  /etc/init.d/nginx
  
----------
  
          ID: nginx-init
  
    Function: cmd.run
  
        Name: chkconfig --add nginx
  
      Result: None
  
     Comment: Command "chkconfig --add nginx" would have been executed
  
     Started: 14:41:25.966786
  
    Duration: 293.959 ms
  
     Changes:
  
----------
  
          ID: /usr/local/nginx/conf/nginx.conf
  
    Function: file.managed
  
      Result: None
  
     Comment: The file /usr/local/nginx/conf/nginx.conf is set to be changed
  
     Started: 14:41:26.261344
  
    Duration: 2.984 ms
  
     Changes:
  
              ----------
  
              newfile:
  
                  /usr/local/nginx/conf/nginx.conf
  
----------
  
          ID: nginx-service
  
    Function: file.directory
  
        Name: /usr/local/nginx/conf.d
  
      Result: None
  
     Comment: The following files will be changed:
  
              /usr/local/nginx/conf.d: directory - new
  
     Started: 14:41:26.264670
  
    Duration: 0.371 ms
  
     Changes:
  
----------
  
          ID: nginx-service
  
    Function: service.running
  
        Name: nginx
  
      Result: None
  
     Comment: Service is set to be started
  
     Started: 14:41:26.286912
  
    Duration: 53.579 ms
  
     Changes:
  
Summary
  
-------------
  
Succeeded: 29 (unchanged=17, changed=4)
  
Failed:     0
  
-------------
  
Total states run:     29

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-544764-1-1.html 上篇帖子: saltstack sls调用方式 下篇帖子: saltstack用法记录
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表