Last active
January 3, 2024 04:54
-
-
Save tlehman/7a0aa9b84da502fb0a2488e2c9cf33b6 to your computer and use it in GitHub Desktop.
Introduction to Puppet Part 3 Manifest (incrementally building it up instead of the all-at-once approach in Part 1)
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
# introduced in https://tlehman.blog/p/introduction-to-puppet | |
# refined in https://tlehman.blog/p/introduction-to-puppet-part-3 | |
node default { | |
# Ensure the required packages are installed | |
package { ['ruby', 'bundler', 'libyaml-dev']: | |
ensure => installed, | |
} | |
exec { 'gem install rails -v 7.1.2': | |
cwd => '/', | |
path => ['/usr/bin'], | |
} | |
exec { 'rails new blog': | |
cwd => '/home/ubuntu', | |
creates => '/home/ubuntu/blog', | |
path => ['/usr/bin', '/usr/local/bin'], | |
user => 'ubuntu', | |
} | |
exec { 'bundle install': | |
cwd => '/home/ubuntu/blog', | |
path => ['/usr/bin'], | |
user => 'ubuntu', | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment