About the whole puppet learning to find some problems

Source: Internet
Author: User

1, at the beginning of the configuration certificate matching,/etc/hosts hostname,/etc/sysconfig/network hostname to puppet cert list--all display client hostname to the same, The server in the client's puppet configuration is to point to the hostname on the server, otherwise the certificate cannot be matched successfully and cannot be sent from S to C
650) this.width=650; "id=" aimg_5844 "src=" http://www.apelearn.com/bbs/data/attachment/forum/201603/13/ 145350j1eq13awclwkrngl.png "class=" Zoom "width=" 644 "alt=" 145350j1eq13awclwkrngl.png "/>650" this.width=650; "id= "aimg_5846" src= "Http://www.apelearn.com/bbs/data/attachment/forum/201603/13/145400j4q0d24fduj40tm4.png" class= " Zoom "width=" 635 "alt=" 145400j4q0d24fduj40tm4.png "/>650" this.width=650; "id=" aimg_5847 "src="/http Www.apelearn.com/bbs/data/attachment/forum/201603/13/145406mb4e0xhcqe4wooyq.png "class=" Zoom "width=" 412 "alt=" 145406mb4e0xhcqe4wooyq.png "/>650" this.width=650; "id=" aimg_5845 "src=" http://www.apelearn.com/bbs/data/ Attachment/forum/201603/13/145352lcd89z7qc5zt9ddm.png "class=" Zoom "width=" 370 "alt=" 145352lcd89z7qc5zt9ddm.png "/ >



2, in the configuration module there definition (here can not fill in hostname name, need to fill in the command line under the normal display of the hostname, otherwise the file in the definition module is not sent to the client), and one-time can transfer multiple files to the client (node default # This is a global configuration, node slave/slave1 #针对指定客户端的配置)

650) this.width=650; "id=" aimg_5848 "src=" http://www.apelearn.com/bbs/data/attachment/forum/201603/13/ 150201u9gk7jb8n8n4hun1.png "class=" Zoom "width=" 303 "alt=" 150201u9gk7jb8n8n4hun1.png "/>

The above node slave is not *.com, if it is slave.com after the file in the module can not be transmitted in the client's/var/log/messages log prompt error, slave1 is the day before getting up before the whim added (is slave cloning machine)
650) this.width=650; "id=" aimg_5849 "src=" http://www.apelearn.com/bbs/data/attachment/forum/201603/13/ 150531g3hqw5dsw95c3ww9.png "class=" Zoom "width=" 646 "alt=" 150531g3hqw5dsw95c3ww9.png "/>650" this.width=650; "id= "aimg_5850" src= "Http://www.apelearn.com/bbs/data/attachment/forum/201603/13/150535okgtigcgkfpof2gp.png" class= " Zoom "width=" 643 "alt=" 150535okgtigcgkfpof2gp.png "/>

Therefore, the above error indicates that the module's. com is removed (with. As delimiter, leaving the first column), the client receives the file successfully, and the log does not prompt the error message
650) this.width=650; "id=" aimg_5851 "src=" http://www.apelearn.com/bbs/data/attachment/forum/201603/13/ 150908eom4y7tjm7mvomoo.png "class=" Zoom "width=" 649 "alt=" 150908eom4y7tjm7mvomoo.png "/>650" this.width=650; "id= "aimg_5853" src= "Http://www.apelearn.com/bbs/data/attachment/forum/201603/13/151305rc2q1ce1c24fc1fa.png" class= " Zoom "width=" 582 "alt=" 151305rc2q1ce1c24fc1fa.png "/>650" this.width=650; "id=" aimg_5854 "src="/http Www.apelearn.com/bbs/data/attachment/forum/201603/13/151402qg192zsi9to2666z.png "class=" Zoom "width=" 584 "alt=" 151402qg192zsi9to2666z.png "/>

3. Copy the Apache directory on the server ready to the/etc/puppet/modules/apache (Apache must be another new module, not in the same module, or recurse = "true" and purge = True These two parameters will be error)
The error is as follows:
Mar 17:55:22 slave puppet-agent[31445]: Could not retrieve catalog from remote Server:error in server:could not Find class testm for slave.com on node slave.com

So you need to do this:

Mkdir-p/etc/puppet/modules/apache/{files,manifests,templates}

vi/etc/puppet/modules/apache/manifests/init.pp
Class apache{
file {"/tmp/apache": #不要加apache的目录, write directly to/usr/local/, or repeat the catalogue (Figure 1)
Owner = "Root",
Group = "Root",
Source = "puppet://$puppetserver/modules/apache",
Recurse = "true", #主目录下有子目录的递归作用
Purge = True #和服务器不同的删除掉 (CS is consistent on both sides, plus recurse = "true" makes sense
}
}

650) this.width=650; "id=" aimg_5871 "src=" http://www.apelearn.com/bbs/data/attachment/forum/201603/13/ 220522u04o0qkcqfhx4knl.png "class=" Zoom "width=" 463 "alt=" 220522u04o0qkcqfhx4knl.png "/>

650) this.width=650; "id=" aimg_5860 "src=" http://www.apelearn.com/bbs/data/attachment/forum/201603/13/ 195835al4daljs4nkcc6ss.png "class=" Zoom "width=" "alt=" 195835al4daljs4nkcc6ss.png "/>650" this.width=650; "id= "aimg_5861" src= "Http://www.apelearn.com/bbs/data/attachment/forum/201603/13/195837pv0dpl8ej6c0kzz0.png" class= " Zoom "width=" 667 "alt=" 195837pv0dpl8ej6c0kzz0.png "/>650" this.width=650; "id=" aimg_5862 "src="/http Www.apelearn.com/bbs/data/attachment/forum/201603/13/202750jzyh4ngh4pkgyou4.png "class=" Zoom "width=" "alt=" 202750jzyh4ngh4pkgyou4.png "/>


Here is the testm and Apache after splitting out will not error (Figure 2)
650) this.width=650; "id=" aimg_5872 "src=" http://www.apelearn.com/bbs/data/attachment/forum/201603/13/ 221023p5rrdglbfetle74y.png "class=" Zoom "width=" 667 "alt=" 221023p5rrdglbfetle74y.png "/>650" this.width=650; "id= "aimg_5873" src= "Http://www.apelearn.com/bbs/data/attachment/forum/201603/13/221908j9x8rrb58br405sb.png" class= " Zoom "width=" alt= "221908j9x8rrb58br405sb.png"/>


PS: When copying the contents of the document to the profile Save Exit View Log found prompt error, this time need to control the content is correct, followed by some punctuation







    • 650) this.width=650; "id=" aimg_5855 "src=" http://www.apelearn.com/bbs/data/attachment/forum/201603/13/ 153010lnb3vi5g6vs9nrsg.png "class=" Zoom "width=" 668 "alt=" server-side module configuration. png "title=" server-side module configuration. png "/>



This article is from the "Steven Never give Up" blog, please be sure to keep this source http://wsw26.blog.51cto.com/1442148/1751750

About the whole puppet learning to find some problems

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.