Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/users/manifests/init.pp

Issue 29341151: Issue 4019 - Added "Edge" to platform choices in Issues tracker at issues1. (Closed)
Patch Set: Created May 10, 2016, 3:35 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/users/files/sudoers-puppet ('k') | modules/web/manifests/server.pp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/users/manifests/init.pp
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/users/manifests/init.pp
@@ -0,0 +1,45 @@
+class users {
+ define user (
+ $user_name = $title,
+ $authorized_keys,
+ $password = undef,
+ $groups = [],
+ ) {
+ user {$user_name:
+ home => "/home/${user_name}",
+ shell => "/bin/bash",
+ managehome => true,
+ password => $password,
+ groups => $groups,
+ }
+
+ file {"/home/${user_name}/.ssh":
+ ensure => directory,
+ owner => $user_name,
+ mode => 0700,
+ require => User[$user_name]
+ }
+
+ file {"/home/${user_name}/.ssh/authorized_keys":
+ ensure => present,
+ owner => $user_name,
+ content => $authorized_keys
+ }
+ }
+
+ user {'root':
+ password => '*'
+ }
+
+ file {'/root/.ssh/authorized_keys':
+ ensure => absent
+ }
+
+ file {'/etc/sudoers.d/puppet':
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0440,
+ source => 'puppet:///modules/users/sudoers-puppet'
+ }
+}
« no previous file with comments | « modules/users/files/sudoers-puppet ('k') | modules/web/manifests/server.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld