Skip to content

Instantly share code, notes, and snippets.

View scarolan's full-sized avatar
🤸‍♂️
In whatever position one is in...one must find balance. -BKS Iyengar

Sean Carolan scarolan

🤸‍♂️
In whatever position one is in...one must find balance. -BKS Iyengar
View GitHub Profile
<% if @port != 80 -%>
Listen <%= @port %>
<% end -%>
<VirtualHost *:<%= @port %>>
ServerAdmin webmaster@localhost
DocumentRoot <%= @document_root %>
<Directory />
Options FollowSymLinks
<% if @port != 80 -%>
Listen <%= @port %>
<% end -%>
<VirtualHost *:<%= @port %>>
ServerAdmin webmaster@localhost
DocumentRoot <%= @document_root %>
<Directory />
Options FollowSymLinks
node.override['yum']['base']['mirrorlist'] = nil
log "check_node" do
message node['yum']['base']['mirrorlist']
end
include_recipe 'yum-centos::default'
Starting Chef Client, version 12.0.3
[2015-02-19T13:42:31-07:00] INFO: *** Chef 12.0.3 ***
[2015-02-19T13:42:31-07:00] INFO: Chef-client pid: 7240
[2015-02-19T13:42:50-07:00] INFO: Run List is []
[2015-02-19T13:42:50-07:00] INFO: Run List expands to []
[2015-02-19T13:42:50-07:00] INFO: Starting Chef Run for vsvphxvclnt01.hotelgroup.com
[2015-02-19T13:42:50-07:00] INFO: Running start handlers
[2015-02-19T13:42:50-07:00] INFO: Start handlers complete.
[2015-02-19T13:42:50-07:00] INFO: HTTP Request Returned 404 Not Found:
resolving cookbooks for run list: []
package "emacs" do
action :install
end
package "emacs" do
action :remove
end
# example for installing multiple packages
@scarolan
scarolan / #1 - Chef Windows Workstation
Last active January 28, 2016 12:44
Ten Quick Tips to Improve your Chef Workflow
Contributor: Adam Edwards
1. Install chocolatey – http://chocolatey.org
2. Install PSReadline to give PowerShell readline power – use the –emacs mode in your PowerShell profile so you have history search and other keyboard behavior like bash: https://github.com/lzybkr/PSReadLine
3. Use chocolatey to install ConEmu, a terminal replacement that supports ANSI colors, dynamic resizing, “normal” text selection and cut and paste, and lots of other customizations: cinst conemu. And set the startup shell for ConEmu to PowerShell (not cmd.exe)
4. Use chocolatey to install an editor – if you’re not already an emacs or vim person, use it to install Atom or Sublime, or Notepad++
5. Always use PowerShell – do not use cmd.exe
6. Install ChefDK and use chef shell-init powershell to get at your Chef Ruby environment.
7. Use Pantry – it can automate #1, 3, 4, and 6 and will probably have support for #2. https://github.com/chef/pantry-chef-repo
8. If you get stuck on a box where you don’t an editor or chocolatey and need to e
This server is property of <%= node["motd"]["company"] %>
<% if node["pci"]["in_scope"] -%>
This server is in-scope for PCI compliance
<% end -%>
<#
.SYNOPSIS
Create a new desktop wallpaper from various sources and optionally overlay some text.
.DESCRIPTION
The script can be run manually, at logon or even as a scheduled task to update the wallpaper regularly
Wallpaper sources include:
- A solid colour
The marketing department loves clowns and bears.
In case the syntax is confusing here, you can illustrate it using pry and a console, along with the "awesome_print" gem. Here's how you'd create this same data structure "by hand"
# chef gem install awesome_print
# pry
1] pry(main)> require "awesome_print"
=> true
[2] pry(main)> default = {}
---
driver:
name: vagrant
customize:
usb: 'off'
usbehci: 'off'
memory: 2048
provisioner:
name: chef_zero