# cat site.pp
node 'pe-201810-master.puppetdebug.vlan' {
include resource_api::server
}
node 'pe-201810-agent.puppetdebug.vlan' {
include resource_api::agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $puppet_service = GWMI Win32_service | Where Name -eq 'puppet' | Select Name,ProcessId,State,Status | |
| $pxpagent_service = GWMI Win32_service | Where Name -eq 'pxp-agent' | Select Name,ProcessId,State,Status | |
| $puppet_process = Get-Process | Where Name -eq 'puppet' | Select Id | |
| $pxpagent_process = Get-Process | Where Name -eq 'pxp-agent' | Select Id | |
| Write-Host Puppet Service $puppet_service | |
| Write-Host PXP-Agent Service $pxpagent_service | |
| if (($pxpagent_service.State -NotLike 'Running') -or ($pxpagent_service.Status -NotLike 'OK')) { | |
| Write-Host |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # PUP-7814: HTTPS file sources with non-puppet-trusted certs cannot be used | |
| # TODO: Rewrite to accept and pass other File resource attributes to the resulting file. | |
| # TODO: Identify a dependable alternative to grep on Windows. | |
| define https_file ( | |
| String $cert, | |
| String $path = $name, | |
| String $temp = "${path}.download", | |
| Pattern[/^https/] $source, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # The Puppet Enterprise High Availability documentation states: | |
| # | |
| # Run the forget command whenever a replica node is destroyed, | |
| # even if you plan to replace it with a replica with the same name. | |
| # | |
| # Some users prefer to forget and reuse (instead of destroy and replace) a replica. | |
| # As an alternative, when `/opt/puppetlabs/bin/puppet-enterprise-uninstaller` isn't available, | |
| # this script uninstalls Puppet Enterprise on the Replica. |
# The env of the daemonized puppet as per /proc/pid/environ:
cat /proc/$(cat /var/run/puppetlabs/agent.pid)/environ
LANG=en_US.UTF-8PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
Given this manifest ....
NewerOlder