Created
May 24, 2013 17:41
-
-
Save pdxmph/5645200 to your computer and use it in GitHub Desktop.
A simple Puppet manifest you can use to manage sshd configuration. The "file" stanza controls the owner, group, permissions and content of the sshd file. Note how line 13 (`source`) uses the `operatingsystem` fact to name the file to provide to the agent. The "service" stanza ensures that sshd is running on the agent system, so you'll always be …
This file contains hidden or 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
| # === Authors | |
| # Author Name <[email protected]> | |
| # | |
| # === Copyright | |
| # Copyright 2013 Puppet Labs | |
| # | |
| class ssh { | |
| file { '/etc/ssh/sshd_config': | |
| ensure => present, | |
| owner => 'root', | |
| group => 'root', | |
| mode => '0644', | |
| source => "puppet:///modules/ssh/sshd_config.${operatingsystem}", | |
| notify => Service['ssh'] | |
| } | |
| service { 'ssh': | |
| ensure => 'running', | |
| enable => 'true', | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment