Skip to content

Instantly share code, notes, and snippets.

@tlehman
Last active January 3, 2024 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlehman/7a0aa9b84da502fb0a2488e2c9cf33b6 to your computer and use it in GitHub Desktop.
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)
# 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