By default, the Puppet agent runs automatically every 30 minutes to check for configuration updates from the Puppet master. This behavior is controlled by the runinterval
setting in puppet.conf
, which defaults to 1800 seconds (30 minutes).
The most reliable way to disable automatic runs is by modifying the agent's configuration:
[agent]
daemon = false
runinterval = 0
After making these changes, restart the Puppet agent service:
sudo systemctl restart puppet
For temporary disablement, use the --disable
flag:
sudo puppet agent --disable "Manual control enabled"
To verify the disabled status:
sudo puppet agent --configprint agent_disabled_lockfile
On systems using systemd, you can prevent the timer from running:
sudo systemctl stop puppet.timer
sudo systemctl disable puppet.timer
After applying any of these methods, verify the changes:
sudo puppet agent --configprint runinterval
# Should return 0 or be absent
When disabling automatic runs:
- Ensure you have alternative methods to trigger Puppet runs when needed
- Consider using
puppet agent --test
for manual runs - For production systems, document the change and inform your team
If you want to keep the runs but prevent actual changes:
[agent]
noop = true
This maintains the schedule but only reports what would change without making modifications.
The default Puppet agent configuration runs automatically every 30 minutes through a background service. This behavior is controlled by the puppet
service on most Linux systems.
# Check current service status
systemctl status puppet
# Common service names across distros:
# - puppet (RHEL/CentOS)
# - puppet-agent (Ubuntu/Debian)
# - pxp-agent (Puppet Enterprise)
For production environments where you want to permanently disable automatic runs while keeping manual execution capability:
# Method 1: Stop and disable the service
systemctl stop puppet
systemctl disable puppet
# Method 2: Alternative configuration approach
# Edit /etc/puppetlabs/puppet/puppet.conf
[agent]
daemon = false
runinterval = 0
When you need to temporarily prevent automatic runs without stopping the service:
# Create a manual lock file
puppet agent --disable "Maintenance window"
# Verify disabled status
puppet agent --configprint disable_message
# Re-enable when ready
puppet agent --enable
Different platforms may require special handling:
# Windows systems using task scheduler
schtasks /Change /TN "Puppet Agent" /DISABLE
# AIX systems using cron
crontab -e
# Comment out puppet agent cron entries
After making changes, verify the agent won't run automatically:
# Check runinterval setting
puppet agent --configprint runinterval
# Simulate what would happen
puppet agent --noop --test
# Monitor for unexpected runs
tail -f /var/log/puppetlabs/puppet/puppet-agent.log
For more control, consider replacing the timer with triggers:
# Example systemd override
# /etc/systemd/system/puppet.service.d/override.conf
[Service]
ExecStart=
ExecStart=/opt/puppetlabs/bin/puppet agent --no-daemonize --onetime