Advertisement
andrewbogott

Untitled

Aug 24th, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. class gerrit {
  2.  
  3. class common {
  4. include standard,
  5. gerrit::jetty,
  6. gerrit::gitweb,
  7. gerrit::crons,
  8. role::ldap::config::labs
  9. }
  10.  
  11. define instance(
  12. $no_apache=false,
  13. $apache_ssl=false,
  14. $ircbot=false,
  15. $slave=false,
  16. $ssh_port="29418",
  17. $db_host="",
  18. $db_name="reviewdb",
  19. $db_user="gerrit"
  20. ) {
  21. # Main config
  22. $sshport = $ssh_port
  23. $host = $name
  24. $dbhost = $db_host
  25. $dbname = $db_name
  26. $dbuser = $db_user
  27.  
  28.  
  29.  
  30. <snip -- safe to presume all brackets are properly closed>
  31.  
  32. class gerrit::jetty ($instance) {
  33. system_role { "gerrit::jetty": description => "Wikimedia gerrit (git) server" }
  34.  
  35. include gerrit::account,
  36. gerrit::crons,
  37. gerrit::gerrit_config,
  38. generic::packages::git-core
  39.  
  40. package { [ "openjdk-6-jre", "git-svn" ]:
  41. ensure => latest;
  42. }
  43.  
  44.  
  45. <snip -- likewise >
  46.  
  47. =====================================
  48.  
  49. Now, another file has this in it:
  50.  
  51. class role::gerrit {
  52.  
  53. system_role { "role::gerrit": description => "Gerrit installation" }
  54.  
  55. class labs {
  56. system_role { "role::gerrit::production": description => "Gerrit in labs!" }
  57.  
  58. gerrit::instance { "gerrit-dev.wmflabs.org":
  59. ircbot => false,
  60. db_host => "gerrit-db"
  61. }
  62.  
  63. gerrit::jetty { "labsjetty":
  64. instance => gerrit::instance["gerrit-dev.wmflabs.org"]
  65. }
  66. }
  67.  
  68. ======================================
  69.  
  70. Puppet returns the following failure:
  71.  
  72. err: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type gerrit::jetty at /etc/puppet/manifests/role/gerrit.pp:17 on node i-000003c8.pmtpa.wmflabs
  73.  
  74.  
  75. My question: Why is gerrit::jetty invalid when gerrit::instance, immediately above, is not?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement