Linux command
puppet-agent 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Run agent once
puppet agent --test
Run in foreground
puppet agent --no-daemonize --verbose
Dry run (noop)
puppet agent --test --noop
Run with specific server
puppet agent --test --server [puppet.example.com]
Enable agent
puppet agent --enable
Disable agent
puppet agent --disable "[reason]"
说明
puppet agent is the client component of the Puppet configuration management system. It connects to a Puppet server, retrieves a compiled catalog of the desired system state, and applies the necessary changes to bring the local machine into compliance. The agent handles SSL certificate management, fact submission via Facter, and detailed reporting of applied changes. In daemon mode, the agent runs as a background service and checks in with the server at a configurable interval, typically every 30 minutes. For manual operations, --test performs a single run with verbose output, while --noop previews what changes would be made without actually applying them. The agent can be temporarily disabled with a lock message to prevent runs during maintenance windows.
参数
- --test
- Single run with output.
- --noop
- Dry run mode.
- --server _HOST_
- Puppet server.
- --no-daemonize
- Run in foreground.
- --enable
- Enable agent runs.
- --disable _MSG_
- Disable with message.
- --verbose
- Verbose output.
- --debug
- Debug output.
FAQ
What is the puppet-agent command used for?
puppet agent is the client component of the Puppet configuration management system. It connects to a Puppet server, retrieves a compiled catalog of the desired system state, and applies the necessary changes to bring the local machine into compliance. The agent handles SSL certificate management, fact submission via Facter, and detailed reporting of applied changes. In daemon mode, the agent runs as a background service and checks in with the server at a configurable interval, typically every 30 minutes. For manual operations, --test performs a single run with verbose output, while --noop previews what changes would be made without actually applying them. The agent can be temporarily disabled with a lock message to prevent runs during maintenance windows.
How do I run a basic puppet-agent example?
Run `puppet agent --test` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --test do in puppet-agent?
Single run with output.