(2) Puppet single test command apply

Source: Internet
Author: User

Stand-alone test apply command:

1. Options,
Debug displays debugging information,
Verbose more information,
NOOP Simulation Execution

[Root@lvs-master manifests]# puppet apply--verbose--noop test.pp
notice:compiled Catalog for Lvs-master.lvs-master in environment production in 0.12 seconds
info:applying configuration version ' 1495770577 ' 
  notice:/stage[main]/main/file[/tmp/12567.txt]/ensure:current_value Absent, should be present (NoOp)
Notice: Class[main]: Would has triggered ' refresh ' from 1 events
Notice:stage[main]: Would has triggered ' refresh ' from 1 E Vents
notice:finished Catalog run in 0.03 seconds

From the return information of the test execution, we can see that when we execute the puppet apply command, the first step is to compile the corresponding TEST.PP list into catalog,
As I have said before, the list cannot be run directly, and it needs to be compiled into catalog, which validates our theory.
The green font in the test information is the version number of the app configuration, and we don't care about it.

2. This time we do not add the –noop option when executing the puppet command, that is, the test execution is not performed, but the actual execution

[Root@lvs-master manifests]# puppet apply--verbose  test.pp
notice:compiled Catalog for Lvs-master.lvs-master In environment production in 0.08 seconds
info:applying configuration version ' 1495773784 '
Notice:/stage[main] /main/file[/tmp/12567.txt]/ensure:created
notice:finished Catalog run in 0.03 seconds
[root@lvs-master manifests]# cat/tmp/12567.txt 
Aaaaababbau

As you can see, Puppet has correctly created a file named 12567.txt, as configured in the TEST.PP list.

Reference Links:
http://www.zsythink.net/archives/331

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.