Created
September 28, 2016 12:22
-
-
Save hunner/ea11d5a51ec0651bed5a0f0823225ce1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$file_defaults = { | |
mode => '0600', | |
owner => 'root', | |
group => 'root', | |
ensure => file, | |
} | |
file {'/etc/ssh_host_dsa_key': | |
* => $file_defaults, | |
} | |
file { '/etc/ssh_host_key': | |
* => $file_defaults, | |
} | |
# The old way of doing it | |
create_resources('file',{ | |
'/etc/ssh_host_dsa_key' => {}, | |
'/etc/ssh_host_dsa_key.pub'=> { | |
mode => '0644', | |
}, | |
'/etc/ssh_host_key' => {}, | |
'/etc/ssh_host_key.pub' => { | |
mode => '0644', | |
}, | |
}, $file_defaults) | |
#Broken, but pretty | |
file { '/etc/ssh_host_dsa_key.pub': | |
mode => '0644', | |
* => $file_defaults, | |
} | |
# ugly, and still uses ; | |
file { default: | |
* => $file_defaults, | |
; '/etc/ssh_host_key.pub': | |
mode => '0644', | |
} | |
#or | |
file { '/etc/ssh_host_key.pub': | |
* => { | |
mode => '0644', | |
} + $file_defaults, | |
} | |
#or | |
file { '/etc/ssh_host_key.pub': | |
* => { mode => '0644' } + $file_defaults, | |
} |
rnelson0
commented
Sep 28, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment