Created
June 21, 2012 13:14
-
-
Save traylenator/2965670 to your computer and use it in GitHub Desktop.
Create svn repo per user.
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
@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' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.