Last active
January 4, 2016 03:49
-
-
Save php-coder/8564329 to your computer and use it in GitHub Desktop.
Setting up a server with Puppet: part 0 (http://slava-semushin.blogspot.ru/2014/01/provisioning-with-puppet-step-0.html).
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
#!/bin/sh | |
exec puppet apply --modulepath="$PWD/my/modules" --verbose my/manifests/site.pp "$@" |
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 my::server { | |
include my::server::user | |
} |
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
#!/bin/sh | |
CODENAME="$(lsb_release -c | awk '{print $2}')" | |
PACKAGE="puppetlabs-release-$CODENAME.deb" | |
wget -- "http://apt.puppetlabs.com/$PACKAGE" | |
dpkg -i "$PACKAGE" | |
rm -fv -- "$PACKAGE" | |
apt-get update | |
apt-get -y install puppet |
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
include my::server |
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 my::server::user { | |
user { 'coder': | |
ensure => 'present', | |
comment => 'Slava Semushin', | |
home => '/home/coder', | |
managehome => true, | |
shell => '/bin/sh' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment