Skip to content

Instantly share code, notes, and snippets.

def organization = 'IT-Puppet'
def github_url = 'https://your-github-enterprise.local'
def page = 1
def linkHeader = 'rel="next"'
def pages = []
while (linkHeader =~ /.*rel="next"/ ) {
repoApi = new URL("${github_url}/api/v3/orgs/${organization}/repos?page=${page}")
@andrewfraley
andrewfraley / gist:fee28eaa91002f73c249
Last active August 29, 2015 14:23
Puppet loop scope
$letter = 'z'
$list = ['a', 'b', 'c']
$list.each |$item| {
if $item == 'b' {
$letter = 'b'
notify{"Letter: ${letter}": }
}
}
notify{"Letter: ${letter}": }
# Installs Maven 3.1.1
node.override['maven']['3']['version'] = "3.1.1"
node.override['maven']['3']['checksum'] = "077ed466455991d5abb4748a1d022e2d2a54dc4d557c723ecbacdc857c61d51b"
include_recipe 'maven'