Reference READMEs:
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
:sources: | |
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/ |
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
# plugins/apache/modules.rb | |
# :ApacheModules good, you might have some other plugin providing modules | |
# and you wouldn't want to overlap on the :Modules namespace. | |
Ohai.plugin(:ApacheModules) do | |
require 'mixlib/shellout' | |
provides "apache/modules" | |
collect_data(:default) do | |
string = Mixlib::ShellOut.new("apachectl -t -D DUMP_MODULES") | |
string.run_command |
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
powershell_script "Install IIS" do | |
code "add-windowsfeature Web-Server" | |
action :run | |
end | |
service "w3svc" do | |
action [:enable, :start ] | |
end | |
# cookbook_file "c:\\inetpub\\wwwroot\\Default.htm" do |
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
"[System Access]" | out-file c:\delete.cfg | |
"PasswordComplexity = 0" | out-file c:\delete.cfg -append | |
"[Version]" | out-file c:\delete.cfg -append | |
'signature="$CHICAGO$"' | out-file c:\delete.cfg -append | |
secedit /configure /db C:\Windows\security\new.sdb /cfg c:\delete.cfg /areas SECURITYPOLICY | |
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
# Plugin-specific configurations | |
if Vagrant.has_plugin?('vagrant-cachier') | |
puts 'INFO: Vagrant-cachier plugin detected. Optimizing caches.' | |
config.cache.enable :chef | |
config.cache.enable :apt | |
else | |
puts 'WARN: Vagrant-cachier plugin not detected. Continuing unoptimized.' | |
end | |
if Vagrant.has_plugin?('Omnibus') |
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
# Execute this script in order to upgrade all the windows nodes in your fleet of servers to the desired version of chef-client. | |
# This script will requires the ChefDK to be installed and configured on your Windows machine. | |
$windows_nodes = knife search node 'platform:windows' -i | |
invoke-command -ComputerName $windows_nodes -filepath C:\Users\MyUser\invoke_upgrade.ps1 -Credential domain\user | |
Read-Host -Prompt “Upgrade complete. Press Enter to exit.” |
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 Disable-InternetExplorerESC { | |
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" | |
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" | |
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 | |
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 | |
Stop-Process -Name Explorer | |
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green | |
} | |
Disable-InternetExplorerESC |
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
# metadata.rb | |
# This metadata.rb example reads the dependencies from Berksfile.lock. This can | |
# be used to implement the Environment Pattern with Chef Server. | |
# | |
# The Environment Cookbook: | |
# http://blog.vialstudios.com/the-environment-cookbook-pattern/ | |
name 'my_face' | |
# [...] |
This is temporal automation to create multiple LDAP users in Chef Automate.
The minimum prerequisites to be able to use this automation are:
- Use a Unix Workstation. (MAC, Linux, etc)
- Have ChefDK Installed. (https://downloads.chef.io/chef-dk/)
- Setup the CLI to point to your Automate Server. (https://asciinema.org/a/89658)
- Download the
bulk-user-creation.rb
script locally and give executable permissions to the file.
OlderNewer