Guest User

Untitled

a guest
Apr 26th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. class users::accounts {
  2. include users::groups
  3.  
  4. @user { "jbouse":
  5. ensure => "present",
  6. uid => "1000",
  7. gid => "1000",
  8. home => "/home/jbouse",
  9. shell => "/bin/bash",
  10. managehome => true,
  11. require => Group["jbouse"],
  12. }
  13.  
  14. }
  15.  
  16. class users::groups {
  17.  
  18. @group { "pwadmin":
  19. ensure => "present",
  20. gid => "990",
  21. }
  22.  
  23. @group { "jbouse":
  24. ensure => "present",
  25. gid => "1000",
  26. }
  27.  
  28. }
  29. class users::keys {
  30.  
  31. @ssh_authorized_key { "jbouse@brisingr":
  32. ensure => "present",
  33. type => "ssh-rsa",
  34. key => "AAAA==",
  35. user => "jbouse"
  36. }
  37.  
  38. @ssh_authorized_key { "jbouse@solitare":
  39. ensure => "present",
  40. type => "ssh-rsa",
  41. key => "AAAA==",
  42. user => "jbouse"
  43. }
  44.  
  45. }
  46.  
  47. class techops::accounts inherits users::accounts {
  48. include users::groups
  49.  
  50. realize(
  51. User["jbouse"]
  52. )
  53.  
  54. User["jbouse"] { groups => "admin" }
  55.  
  56. }
  57.  
  58. class techops::groups inherits users::groups {
  59.  
  60. realize(
  61. Group["admin"],
  62. Group["jbouse"]
  63. )
  64.  
  65. }
  66.  
  67. class techops::keys inherits users::keys {
  68.  
  69. realize(
  70. Ssh_authorized_key["jbouse@brisingr"],
  71. Ssh_authorized_key["jbouse@solitare"],
  72. )
  73.  
  74. }
Add Comment
Please, Sign In to add comment