diff options
author | varac <varacanero@zeromail.org> | 2015-11-09 10:22:58 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2015-11-09 10:22:58 +0100 |
commit | fe92ce01fabe2d1b6a966d119e24c07cd164b776 (patch) | |
tree | 0901bbc2648f488ed7ff0da0f5d40bbfeafc4437 /manifests/base.pp | |
parent | b3e81589eec604768e08ed56ce5ca42a4b33db89 (diff) | |
download | puppet-sshd-fe92ce01fabe2d1b6a966d119e24c07cd164b776.tar.gz puppet-sshd-fe92ce01fabe2d1b6a966d119e24c07cd164b776.tar.bz2 |
[feat] Optinally disable exported resources
If run masterless, we cannot export resources, so
we move them to an own class. Including it can be
disabled by passing "use_storedconfig" to the sshd
class.
Diffstat (limited to 'manifests/base.pp')
-rw-r--r-- | manifests/base.pp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/manifests/base.pp b/manifests/base.pp index 6dddedf..abd4fb8 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -25,21 +25,9 @@ class sshd::base { case $::sshrsakey { '': { info("no sshrsakey on ${::fqdn}") } default: { - @@sshkey{$::fqdn: - ensure => present, - tag => 'fqdn', - type => ssh-rsa, - key => $::sshrsakey, - } - # In case the node has uses a shared network address, - # we don't define a sshkey resource using an IP address - if $sshd::shared_ip == 'no' { - @@sshkey{$sshd::sshkey_ipaddress: - ensure => present, - tag => 'ipaddress', - type => ssh-rsa, - key => $::sshrsakey, - } + # only export sshkey when storedconfigs is enabled + if $::sshd::use_storedconfigs { + include ::ssh::sshkey } } } |