Skip to content

Instantly share code, notes, and snippets.

View wamonite's full-sized avatar

Warren Moore wamonite

View GitHub Profile
anonymous
anonymous / ansibletest.rb
Created January 21, 2016 20:55
Refactoring a block for use with ansible provisioning
#!/usr/bin/env ruby
class TestClass
def initialize(str)
@class_str = str
end
# This is the method we want to call
def foo(str, &block)
# We're going to pass the STDOUT object into the block. This was ansible before.