File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
lib/beaker_puppet_helpers Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -56,5 +56,24 @@ 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 and on the Host.
65+ # Use the spec_prep rake task to deploy the dependencies locally.
66+ #
67+ # @param [Beaker::Host, Array<Beaker::Host>, String, Symbol] hosts
68+ # One or more hosts to act upon, or a role (String or Symbol) that
69+ # identifies one or more hosts.
70+ # @param [String] source
71+ # The directory where the modules sit
72+ # @param [String] destination
73+ # The directory where the modules will be placed
74+ def install_puppet_modules_via_rsync ( hosts , source = 'spec/fixtures/modules/' , destination = '/etc/puppetlabs/code/environments/production/modules' )
75+ real_source = File . realpath ( source )
76+ rsync_to ( hosts , real_source , destination )
77+ end
5978 end
6079end
You can’t perform that action at this time.
0 commit comments