This file contains 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
plan os_patching::patch_node( | |
TargetSpec $target, | |
Boolean $downtime_enable = true, | |
){ | |
## Prevalidation task ( |
This file contains 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
groups: | |
- name: windows | |
targets: | |
- <windows hostname > | |
config: | |
transport: winrm | |
winrm: | |
user: administrator | |
password: <replaceme> | |
ssl: false |
This file contains 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
modulepath: "modules:site-modules" | |
inventoryfile: ./inventory.yaml | |
concurrency: 10 | |
format: human | |
ssh: | |
host-key-check: false | |
private-key: ./student.pem | |
user: centos | |
connect-timeout: 30 | |
winrm: |
This file contains 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
[main] | |
server=puppet |
This file contains 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
# Use Case 1 - use IP and OS logic to determine which configs to apply to node | |
# This file should live in your control-repo or on the PE Master at | |
# /etc/puppetlabs/code/environments/production/site/profile/manifests/platform/baseline.pp | |
class profile::platform::baseline { | |
# IP Ranges equate to different environments (DEV, UAT, PROD) | |
# OS specific configurations based on OS Type. | |
$plat = $facts.get('os.family') ? { | |
#If os.family == 'windows' then $plat = 'windows', default is 'linux' |
This file contains 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
[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; $webClient = New-Object System.Net.WebClient; $webClient.DownloadFile('https://master.inf.puppet.vm:8140/packages/current/install.ps1', 'install.ps1'); .\install.ps1 |
This file contains 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
class profile::linux::baseline { | |
package { 'unzip': | |
ensure => installed, | |
} | |
# USERS | |
if $::operatingsystem == 'CentOS' { | |
user { 'puppetdemo': | |
ensure => present, | |
managehome => true, | |
groups => ['wheel'], |
This file contains 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
[root@ip-10-98-10-242 ~]# /opt/puppetlabs/puppet/bin/puppet resource service puppet ensure=stopped | |
Notice: /Service[puppet]/ensure: ensure changed 'running' to 'stopped' | |
service { 'puppet': | |
ensure => 'stopped', | |
} | |
[root@ip-10-98-10-242 ~]# vi /etc/puppetlabs/code/environments/production/hieradata/common.yaml | |
[root@ip-10-98-10-242 ~]# vi /etc/puppetlabs/console-services/conf.d/activity-database.conf | |
[root@ip-10-98-10-242 ~]# vi /etc/puppetlabs/console-services/conf.d/rbac-database.conf | |
[root@ip-10-98-10-242 ~]# vi /etc/puppetlabs/console-services/conf.d/classifier-database.conf | |
[root@ip-10-98-10-242 ~]# systemctl restart pe-console-services |
This file has been truncated, but you can view the full file.
This file contains 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
[0;36mDebug: Applying settings catalog for sections main, agent, ssl[0m | |
[0;36mDebug: Caching environment 'production' (ttl = 0 sec)[0m | |
[0;36mDebug: Evicting cache entry for environment 'production'[0m | |
[0;36mDebug: Caching environment 'production' (ttl = 0 sec)[0m | |
[0;36mDebug: Evicting cache entry for environment 'production'[0m | |
[0;36mDebug: Caching environment 'production' (ttl = 0 sec)[0m | |
[0;36mDebug: Evicting cache entry for environment 'production'[0m | |
[0;36mDebug: Caching environment 'production' (ttl = 0 sec)[0m | |
[0;36mDebug: Using settings: adding file resource 'confdir': 'File[/etc/puppetlabs/puppet]{:path=>"/etc/puppetlabs/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'[0m | |
[0;36mDebug: Using settings: adding file resource 'codedir': 'File[/etc/puppetlabs/code]{:path=>"/etc/puppetlabs/code", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'[0m |
This file contains 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
{ | |
"ignition": { "version": "2.0.0" }, | |
"storage": { | |
"disks": [ | |
{ | |
"device": "/dev/sdb", | |
"wipeTable": true, | |
"partitions": [{ | |
"label": "container_storage", | |
"number": 1, |