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
class dellpoc::dell_sccm { | |
exec { 'intsall_sccm': | |
provider => 'windows', | |
command => '\\\\AUSPWCFGAM1.aus.amer.dell.com\\client\\am1install.bat', | |
unless => 'c:\windows\system32\sc.exe query ccmexec', | |
} | |
file {'c:\windows\cmtrace.exe': | |
ensure => 'file', |
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
class dellpoc::dell_sccm { | |
exec { 'intsall_sccm': | |
provider => 'windows', | |
command => '\\\\AUSPWCFGAM1.aus.amer.dell.com\\client\\am1install.bat', | |
unless => 'c:\windows\system32\sc.exe query ccmexec', | |
} -> | |
file {'c:\windows\cmtrace.exe': | |
ensure => 'file', |
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
require 'json' | |
require 'csv' | |
require 'puppet/face' | |
# Requires installation of https://forge.puppetlabs.com/dalen/puppetdbquery | |
# comma separated list of fact names you care about | |
whitelist = File.open('whitelist.csv').read.chomp | |
headers = whitelist.split(',') | |
# get yo data |
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
require 'json' | |
require 'csv' | |
f = File.open('foo.json') | |
csv_out = CSV.generate do |csv| | |
nodes = JSON.parse(f.read) | |
#create header | |
entry = nodes.first | |
csv << ['node'] + entry[1].keys |
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
conf t | |
hostname n9kv | |
ip domain-lookup | |
ip domain-name localdomain | |
vrf context management | |
ip domain-name localdomain | |
ip name-server 10.240.0.10 | |
interface mgmt0 | |
vrf member management | |
ip address dhcp |
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
2. When I install notepadplusplus and If I force it to get installed on e:\notepadplusplus. Chocolatey logs shows its installed and it gets installed in c:\program files\notepad++. I don’t see any errors in the chocolatey logs. | |
Puppet code: | |
class learn03{ | |
if $::kernel == windows{ | |
Package { provider =>chocolatey} |
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 | |
# simple 3.7 NC classifier commands | |
declare -x PE_CERT=$(/opt/puppet/bin/puppet agent --configprint hostcert) | |
declare -x PE_KEY=$(/opt/puppet/bin/puppet agent --configprint hostprivkey) | |
declare -x PE_CA=$(/opt/puppet/bin/puppet agent --configprint localcacert) | |
declare -x NC_CURL_OPT="-s --cacert $PE_CA --cert $PE_CERT --key $PE_KEY --insecure" |
NewerOlder