Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix README for Puppet 4 #85

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ require 'pry'

# Install Puppet on all hosts
hosts.each do |host|
on host, install_puppet
# Select the correct method below.
on host, install_puppet # this is for Puppet 3
install_puppet_agent_on(host, :version => '1.5.2') # this is for Puppet 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install_puppet is itself a shortcut to installing puppet on all hosts available. This means that for running it on all hosts, you're installing puppet hosts*hosts number of times.

This should actually be just install_puppet outside of the hosts loop, or if wanted inside the loop, it should be done with this line:

install_puppet_on(host, options)

Note that the options are the global options (accessible from the shim as the options method used here).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ps - Doesn't the code say that install_puppet is deprecated in favor of install_puppet_on()?
https://github.com/puppetlabs/beaker/blob/0e13b888970aae8fb82343078ce14eef69bb236c/lib/beaker/dsl/install_utils/foss_utils.rb#L204

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it is. There's one known issue with using install_puppet_on, however, which can be gotten around by providing the global options hash as the opts parameter to that method.

end

RSpec.configure do |c|
Expand All @@ -104,6 +106,7 @@ end
```

Update spec_helper_acceptance.rb to reflect the module under test. You will need to set the correct module name and add any module dependencies. Place the file in the `spec` directory (in this case `puppetlabs-mysql/spec`)
NOTE the different methods for installing the agent for Puppet 3 and Puppet 4.

##Create spec tests for your module

Expand Down