mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
Adding tasks for running Puppet and r10k
This commit is contained in:
parent
812ef8a74c
commit
9be685a466
1 changed files with 20 additions and 0 deletions
20
Rakefile
20
Rakefile
|
|
@ -2,6 +2,7 @@ require 'rubocop/rake_task'
|
|||
require 'rubygems'
|
||||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'puppet-lint/tasks/puppet-lint'
|
||||
require 'tty-command'
|
||||
require 'yamllint/rake_task'
|
||||
|
||||
exclude_paths = [
|
||||
|
|
@ -63,3 +64,22 @@ task :tests do
|
|||
Rake::Task[:rubocop].invoke
|
||||
Rake::Task[:spec].invoke
|
||||
end
|
||||
|
||||
namespace 'dots' do
|
||||
cmd = TTY::Command.new
|
||||
|
||||
desc 'Run r10k'
|
||||
task :run_r10k do
|
||||
command = 'bundle exec r10k puppetfile install \
|
||||
--puppetfile ~/.dotfiles/puppet/production/Puppetfile -v'
|
||||
cmd.run(command)
|
||||
end
|
||||
|
||||
desc 'Run Puppet'
|
||||
task :run_puppet do
|
||||
command = 'bundle exec puppet apply \
|
||||
--environmentpath ~/.dotfiles/puppet \
|
||||
~/.dotfiles/puppet/production/manifests/site.pp'
|
||||
cmd.run(command)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue