Skip to content

Instantly share code, notes, and snippets.

@fujin
Created October 20, 2008 20:48
Show Gist options
  • Select an option

  • Save fujin/18165 to your computer and use it in GitHub Desktop.

Select an option

Save fujin/18165 to your computer and use it in GitHub Desktop.
#!/usr/bin/env puppet
exec {
"git-mysiterepos":
path => '/usr/bin:/bin:/usr/local/bin:$PATH',
cwd => '/tmp',
creates => '/tmp/feather/.git',
command => 'git clone git://github.com/fujin/feather.git /tmp/feather';
"git-update-mysiterepos":
require => Exec["git-mysiterepos"],
path => '/usr/bin:/bin:/usr/local/bin:$PATH',
cwd => '/tmp/feather',
command => 'git pull';
}
aj@junglist /tmp$ ./test.pp --debug
debug: Creating default schedules
debug: //Exec[git-update-mysiterepos]/require: requires Exec[git-mysiterepos]
debug: //Exec[git-mysiterepos]: Changing returns
debug: //Exec[git-mysiterepos]: 1 change(s)
debug: //Exec[git-mysiterepos]: Executing 'git clone git://github.com/fujin/feather.git /tmp/feather'
debug: Executing 'git clone git://github.com/fujin/feather.git /tmp/feather'
notice: //Exec[git-mysiterepos]/returns: executed successfully
debug: //Exec[git-update-mysiterepos]: Changing returns
debug: //Exec[git-update-mysiterepos]: 1 change(s)
debug: //Exec[git-update-mysiterepos]: Executing 'git pull'
debug: Executing 'git pull'
notice: //Exec[git-update-mysiterepos]/returns: executed successfully
debug: Finishing transaction -612100258 with 2 changes
aj@junglist /tmp$ ./test.pp --debug
debug: Creating default schedules
debug: //Exec[git-update-mysiterepos]/require: requires Exec[git-mysiterepos]
debug: //Exec[git-update-mysiterepos]: Changing returns
debug: //Exec[git-update-mysiterepos]: 1 change(s)
debug: //Exec[git-update-mysiterepos]: Executing 'git pull'
debug: Executing 'git pull'
notice: //Exec[git-update-mysiterepos]/returns: executed successfully
debug: Finishing transaction -611690658 with 1 changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment