disl 发表于 2018-8-2 11:47:37

一步一步学会puppet(四)--master/agent模型

# puppet agent -v -t  
info: Caching catalog for nginx1.lamp.com
  
info: Applying configuration version '1400402077'
  
notice: /Stage/Nginx::Package::Redhat/Package/ensure: created
  
notice: /Stage/Nginx::Config/File/content:
  
--- /etc/nginx/nginx.conf   2013-04-27 04:36:51.000000000 +0800
  
+++ /tmp/puppet-file20140518-5216-1feu0op-0 2014-05-18 16:34:51.566999838 +0800
  
@@ -1,42 +1,31 @@
  
-# For more information on configuration, see:
  
-#   * Official English Documentation: http://nginx.org/en/docs/
  
-#   * Official Russian Documentation: http://nginx.org/ru/docs/
  
-
  
-user            nginx;
  
-worker_processes1;
  
+user nginx;
  
+worker_processes 1;
  error_log/var/log/nginx/error.log;
  
-#error_log/var/log/nginx/error.lognotice;
  
-#error_log/var/log/nginx/error.loginfo;
  
-
  pid      /var/run/nginx.pid;
  
-
  events {
  
-    worker_connections1024;
  
+worker_connections 1024;
  
+
  }
  
-
  http {
  
-    include       /etc/nginx/mime.types;
  
-    default_typeapplication/octet-stream;
  
+include       /etc/nginx/mime.types;
  
+default_typeapplication/octet-stream;
  
+
  
+access_log/var/log/nginx/access.log;
  
+
  
+sendfile    on;
  
+
  
+
  
+
  
+keepalive_timeout65;
  
+tcp_nodelay      on;
  
-    log_formatmain'$remote_addr - $remote_user [$time_local] "$request" '
  
-                      '$status $body_bytes_sent "$http_referer" '
  
-                      '"$http_user_agent" "$http_x_forwarded_for"';
  
-
  
-    access_log/var/log/nginx/access.logmain;
  
-
  
-    sendfile      on;
  
-    #tcp_nopush   on;
  
-
  
-    #keepalive_timeout0;
  
-    keepalive_timeout65;
  
-
  
-    #gzipon;
  
-
  
-    # Load config files from the /etc/nginx/conf.d directory
  
-    # The default server is in conf.d/default.conf
  
-    include /etc/nginx/conf.d/*.conf;
  
+
  
+gzip         on;
  
+gzip_disable "MSIE \.(?!.*SV1)";
  
+
  
+include /etc/nginx/conf.d/*.conf;
  }
  
info: FileBucket got a duplicate file {md5}d9dfc198c249bb4ac341198a752b9458
  
info: /Stage/Nginx::Config/File: Filebucketed /etc/nginx/nginx.conf to puppet with sum d9dfc198c249bb4ac341198a752b9458
  
notice: /Stage/Nginx::Config/File/content: content changed '{md5}d9dfc198c249bb4ac341198a752b9458' to '{md5}df69537f815f9aacfe6dd6a439a7ba06'
  
notice: /Stage/Nginx::Config/File/ensure: defined content as '{md5}530e67c1708924887565ce91f2c5b9f8'

  
info:>
  
info:>
  
info:>  
notice: /Stage/Nginx::Service/Exec: Triggered 'refresh' from 1 events
  
info: /Stage/Nginx::Service/Exec: Scheduling refresh of Service
  
notice: /Stage/Nginx::Service/Service/ensure: ensure changed 'stopped' to 'running'
  
notice: /Stage/Nginx::Service/Service: Triggered 'refresh' from 2 events
  
notice: Finished catalog run in 5.06 seconds
  
# 特别注意notice的输出内容,分别完成了nginx程序的安装,配置文件的生成,服务的启动等操作;
页: [1]
查看完整版本: 一步一步学会puppet(四)--master/agent模型