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
bolt plan run facts -i inventory.yaml nodes=boltservers |
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
bolt plan run facts -i inventory.yaml --targets=linuxnode1 |
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
Function New-LegacySelfSignedCert | |
{ | |
Param ( | |
[string]$SubjectName = $env:COMPUTERNAME, | |
[int]$ValidDays = 1095 | |
) | |
$hostnonFQDN = $env:computerName | |
$hostFQDN = [System.Net.Dns]::GetHostByName(($env:computerName)).Hostname | |
$SignatureAlgorithm = "SHA256" |
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
{ | |
"auth": { | |
"accessor": "hmac-sha256:67869871d870282745682c729d86cee81acb5346c3dbecb573b7d44ea5506d06", | |
"client_token": "hmac-sha256:8fe52f85c93aad7df87c7203f864a9900d25451a1cc88c486ae0c951bd3a8936", | |
"display_name": "root", | |
"policies": [ | |
"root" | |
], | |
"token_policies": [ | |
"root" |
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
# Find the domain controller IP address and replace the N with the environment number | |
ping winworkNdc.classroom.puppet.com | |
# Fetch the index number for the network interface | |
$adapterid = Get-NetAdapter | Select -expand InterfaceIndex | |
# Set the DC_IP_ADDRESS to the IP address found in from the first command | |
set-DnsClientServerAddress -InterfaceIndex $adapterid -ServerAddresses ('DC_IP_ADDRESS') | |
# Join Active Directory Domain |
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
... |
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
[CmdletBinding()] | |
param ( | |
# The number of days the SSL certificate is valid | |
[Parameter(Mandatory=$false)] | |
[int] | |
$certificate_validity_days | |
) | |
$listeners = Get-ChildItem WSMan:\localhost\Listener |
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
#!/usr/local/bin/python3 | |
import os | |
import time | |
import hvac | |
import urllib3 | |
from prettytable import PrettyTable | |
urllib3.disable_warnings() |
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
[ | |
{ | |
"id": 1, | |
"name": "633450 - (R&D)", | |
"costcenter": 633450 | |
}, | |
{ | |
"id": 2, | |
"name": "633256 - (Security)", | |
"costcenter": 633256 |
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": "3.2.0" | |
}, | |
"passwd": { | |
"users": [ | |
{ | |
"name": "core", | |
"sshAuthorizedKeys": [ | |
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCsvDSUMdJu7KaECnb8nay1bhZn5n68aaPIgwE+DgJyP0vVzrPedXHqGXvQDbxfXiixG4qhr+AVBD4aOhBRvXfpGqVk4nvlO9+9wkHVtdGbyz9IDWoZqzzaBHprAbUUXzgPWOg7IvlnNQQZml7uhW2B6E1xJ6I7cf4WE4YeJSefpwrgiYmwKgcR98Xj2BHzGrN/sEa2LU0uPIHWfgQlzWcRJSNge90lQizhLiv8vHccbSRoubgmOS+eA+IkmGr0TVpQGpeJmg2vhHDYKl1YdJrPdTUNPDdK2slt9eVbIZHJgpFuVbUHOq9PxovRYM7e8ZE44/r3a2Oghd+LQ1pOZ+bO2SVPD0x11jT7/fvM89WLiKkkLG7hoIXLE6DhdIhv+MiXAGJAKoLLzs9WjigOs1t2JdHaXI5ZayBD1yqFctLkeD/BEJ3OP+imXuTKBnWdOJRWX2t/hWQWyNKZnR211DBu/Skp0/Z0/JjUY1G1e0VX+cqNM/tkKdUPWBQeO5dw0qo7so/T7FWiPnJkCeuuQpUqig5gH17IJ0a+8QQY3sXSAWobSwzRa3+De8tchHwT9WLhXw4VofA+3rx+/fo0JZjrD0cNTlTceUeusQCQSSh9RbhxR/AJMRTJHvGfDgE4SsjEo6+av8uNfDBwxezDJ8XGWI6zyhWd7Rp1QkBzn/ZpOw== [email protected]" |