Guest User

Untitled

a guest
Jul 11th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. # /etc/puppet/modules/users/virtual.pp
  2.  
  3. class user::virtual {
  4. @user { "pheezy":
  5. home => "/home/pheezy",
  6. ensure => "present",
  7. groups => ["root","wheel"],
  8. uid => "8001",
  9. password => "SCRAMBLED",
  10. comment => "Pheezy",
  11. shell => "/bin/bash",
  12. managehome => "true",
  13. }
  14.  
  15. # /etc/puppet/modules/users/manifests/ssh_authorized_keys.pp
  16.  
  17. ssh_authorized_key { "pheezy":
  18. ensure => "present",
  19. type => "ssh-dss",
  20. key => "AAAAB....",
  21. user => "pheezy",
  22. }
  23.  
  24.  
  25. # /etc/puppet/modules/users/init.pp
  26.  
  27. import "users.pp"
  28. import "ssh_authorized_keys.pp"
  29.  
  30. class user::ops inherits user::virtual {
  31. realize(
  32. User["pheezy"],
  33. )
  34. }
  35.  
  36. # /etc/puppet/manifests/modules.pp
  37.  
  38. import "sudo"
  39. import "users"
  40.  
  41. # /etc/puppet/manifests/nodes.pp
  42.  
  43. node basenode {
  44. include sudo
  45. }
  46.  
  47. node 'testbox' inherits basenode {
  48. include user::ops
  49. }
  50.  
  51. # /etc/puppet/manifests/site.pp
  52.  
  53. import "modules"
  54. import "nodes"
  55.  
  56. # The filebucket option allows for file backups to the server
  57. filebucket { main: server => 'puppet' }
  58.  
  59. # Set global defaults - including backing up all files to the main filebucket and adds a global path
  60. File { backup => main }
  61. Exec { path => "/usr/bin:/usr/sbin/:/bin:/sbin" }
  62.  
  63. ###################################
  64. debug: Retrieving catalog
  65. debug: Calling puppetmaster.getconfig
  66. err: Could not retrieve catalog: Could not parse for environment production: Syntax error at 'user'; expected '}' at /etc/puppet/modules/users/manifests/ssh_authorized_keys.pp:9
Add Comment
Please, Sign In to add comment