File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
lib/beaker_puppet_helpers Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -56,5 +56,25 @@ def install_local_module_on(hosts, source = '.')
5656 File . unlink ( source_path ) if source_path
5757 end
5858 end
59+
60+ # Copies all local dependencies into a SUT via rsync+ssh
61+ #
62+ # install_local_module_on creates an archive, scps it and then unpack it.
63+ # That takes up a lot of time when you've many modules. rsync+ssh is a faster alternative,
64+ # but it requires rsync in the SUT. Use the spec_prep rake task to deploy the dependencies locally.
65+ #
66+ # @param [Beaker::Host, Array<Beaker::Host>, String, Symbol] hosts
67+ # One or more hosts to act upon, or a role (String or Symbol) that
68+ # identifies one or more hosts.
69+ # @param [String] source
70+ # The directory where the modules sit
71+ # @param [String] destination
72+ # The directory where the modules will be placed
73+ def install_puppet_modules_via_rsync ( hosts , source = 'spec/fixtures/modules/' , destination = '/etc/puppetlabs/code/environments/production/modules' )
74+ real_source = File . realpath ( source )
75+ block_on hosts do |host |
76+ host . do_rsync_to ( real_source , destination )
77+ end
78+ end
5979 end
6080end
You can’t perform that action at this time.
0 commit comments