Skip to content

Instantly share code, notes, and snippets.

@mrrcollins
Created October 31, 2013 21:25
Show Gist options
  • Save mrrcollins/7257478 to your computer and use it in GitHub Desktop.
Save mrrcollins/7257478 to your computer and use it in GitHub Desktop.
/etc/puppet/hiera.yaml
---
:backends:
- yaml
:yaml:
:datadir: /etc/puppet/hieradata
:hierarchy:
- nodeinfo
- common
/etc/puppet/hieradata/nodeinfo.yaml
QP6220GYV4Q:
user: testuser
password: $6$eKwQ23ju$AdqZ/OXWZqK7xGSVKWz6yjpUti9nvMxRzqKmZ3v6H4L6KZ3MJvtQsvSGZ.nz5XC4L1c6hrisTc8oO9VExz6tN/
H09362CR4PD:
user: testuser2
password: $6$eKwQ23ju$AdqZ/OXWZqK7xGSVKWz6yjpUti9nvMxRzqKmZ3v6H4L6KZ3MJvtQsvSGZ.nz5XC4L1c6hrisTc8oO9VExz6tN/
Manifest:
$nodeinfo = hiera($::serialnumber)
user { $nodeinfo['user']:
ensure => present,
shell => '/bin/bash',
home => '/home/student',
managehome => true,
password => $nodeinfo['password'],
groups => ['audio'],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment