Skip to content

Instantly share code, notes, and snippets.

@traylenator
Created June 21, 2012 13:14
Show Gist options
  • Save traylenator/2965670 to your computer and use it in GitHub Desktop.
Save traylenator/2965670 to your computer and use it in GitHub Desktop.
Create svn repo per user.
@user{'steve':
uid => 3001
}
@user{'owen':
uid => 6001,
}
@user{'tim':
uid => 6002
}
$users = ['steve','owen','tim']
define svn_repo ($path = /file/default/${title} ) {
$username = $title
exec{"svn_create_${username}":
creates => "${path}",
command => "/usr/bin/svnadmin create ${path}",
requires => User[$username]
}
User <| title == ${username} |>
}
# It depends a lot upon the starting point of how your users get
# onto the system. One way.
svn_repo{$users:
$path => '/override/to/this'
}
@traylenator
Copy link
Author

Is all well and good but what If I have a richer system with a second array.

for example:
$users = ['steve' uuid => '4000','owen' uuid => '4001','tim',uuid => '5001']
Try as I might I could only seem to handle one list, and not be able to do things multi dimensional.

Also how do I do the equivalent of pythons "range" command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment