发表于 2018-8-1 12:10:12

saltstack部署nginx-IT小二郎

# 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]
查看完整版本: saltstack部署nginx-IT小二郎