Created
March 13, 2015 18:05
-
-
Save rmueck/057c63d862c966f08409 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
# == Class: rundeck | |
# | |
# Full description of class rundeck here. | |
# | |
# === Parameters | |
# | |
# Document parameters here. | |
# | |
# [*sample_parameter*] | |
# Explanation of what this parameter affects and what it defaults to. | |
# e.g. "Specify one or more upstream ntp servers as an array." | |
# | |
# === Variables | |
# | |
# Here you should define a list of variables that this module would require. | |
# | |
# [*sample_variable*] | |
# Explanation of how this variable affects the funtion of this class and if | |
# it has a default. e.g. "The parameter enc_ntp_servers must be set by the | |
# External Node Classifier as a comma separated list of hostnames." (Note, | |
# global variables should be avoided in favor of class parameters as | |
# of Puppet 2.6.) | |
# | |
# === Examples | |
# | |
# class { 'rundeck': | |
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ], | |
# } | |
# | |
# === Authors | |
# | |
# Author Name <[email protected]> | |
# | |
# === Copyright | |
# | |
# Copyright 2015 Your name here, unless otherwise noted. | |
# | |
class rundeck { | |
service { 'ssh': | |
ensure => 'running', | |
} -> | |
group { 'rundeck': | |
ensure => 'present', | |
gid => '5005', | |
} -> | |
user { 'rundeck': | |
ensure => 'present', | |
comment => 'Rundeck technical user', | |
uid => '5005', | |
gid => '5005', | |
home => '/home/rundeck', | |
managehome => true, | |
shell => '/bin/bash', | |
password => '$5$JYZya7.JdYD1./F$DBsRLqt5fRRmZP/fR03IX0A1JzMAZqY4lx5uhlz601A', | |
} -> | |
ssh_authorized_key { 'rundeck_user': | |
ensure => 'present', | |
name => 'rundeck-key', | |
key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQDETOy47N4/PPaDH6NXS/NIaTK5YlupUoAWGIMw38Zg2QJgwHQq9KaNWGh5sO/FwMGB5+gKvwwnLnhixT9c4p4Q/1H+5BhXN/M0SX/locz9lqWoaoOvEL/8jviV5ePHJ2CMfmyMyuFWsaK4hC9OuI8+r2UgHAL0zEhEtTcvmDPqQUqucJDUdJ43wRU5KWTMZGC8pu3i2eOQq24/65b6jpp1sIxeTYDa7OrsZasEzV84Tg/35uejHB2Q/se6I1QGRrRvTZv4uZTkoTy2kTHIfZDYl5QhI7Y5KwfVjFMhs6tA/12xiy+OcH2sdRB5w/9xXHs4qWkLAH7ojVr226P1ZZ4D', | |
type => 'ssh-rsa', | |
options => 'np-pty', | |
user => 'root', | |
} -> | |
sshd_config { 'PasswordAuthentication': | |
ensure => present, | |
condition => 'User rundeck', | |
value => 'no', | |
notify => Service[ssh], | |
} -> | |
sshd_config { 'KbdInteractiveAuthentication': | |
ensure => present, | |
condition => 'User rundeck', | |
value => 'no', | |
notify => Service[ssh], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment