Hello,
I have a yaml data file containing user account with following information.
#more users.yaml
---
os_users:
user1:
locked: false
comment: System Operator
uid: '700'
gid: '700'
groups:
- admin
- sudonopw
sshkeys:
- ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCmL8j+5zE/VLPIMeDqNQt8L
user2:
locked: true
comment: Test Locked Account
uid: '701'
gid: '701'
groups:
- admin
- sudonopw
sshkeys:
- ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCm
I can search os_users information like following:
#hiera -c /etc/hiera.yaml os_users
{"user1"=>{"groups"=>["admin", "sudonopw"], "locked"=>false,
"comment"=>"System Operator", "uid"=>"700", "sshkeys"=>["ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCmL8j+5zE/VLPIMeDqNQt8L"],
"gid"=>"700"}, "user2"=>{"groups"=>["admin", "sudonopw"], "locked"=>true,
"comment"=>"Test Locked Account", "uid"=>"701", "sshkeys"=>["ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCm"],
"gid"=>"701"}}
My question is how I can get value of os_users -> user1 -> sshkeys. I tried:
#hiera -c /etc/hiera.yaml os_users[user1[sshkeys]]
nil
Could you please advise whether this is doable or direct me to some
document?
Thanks in advance,
carl
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.