Folks,
I am having some confusion regarding 'moving' class definitions into hiera.
I am using the razorsedge/snmp module, and I am able to use it successfully by specifiying the following as class defnitions:
#####
# SNMP Configuration
class profiles::os::linux::snmp {
snmp::snmpv3_user { 'MYUSER':
authpass => 'SomePassword',
authtype => 'MD5',
}
class { 'snmp':
snmpd_config => [ 'rouser MYUSER auth' ],
}
}
It is my understanding that I can move this into hieradata, which would be ideal.
However, it seems that the only portion of the above code that I can successfully implement in hiera is:
snmp::snmpd_config:
- 'rouser MYUSER auth'
The /var/snmpd/snmpd.config file contains the new line after a puppet agent run.
But, I cannot seem to implement the rest of it. If I do this:
snmp::snmpv3_user:
'MYUSER`:
authpass: 'SomePassword'
authtype: 'MD5'
it doesn't seem to work. I never get a new user named "MYUSER"
So here are my questions:
- Am I doing this correctly?
- Is it a valid assumption that
module defintions can always be
defined in hiera instead?
Thanks,
Todd
↧