Created
June 9, 2015 04:24
-
-
Save justinstoller/65d879f7e942a0353b80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
legacy_opts = { | |
:default_action => 'gem_install', | |
:version => (ENV['PUPPET_VERSION'] || '3.8.1'), | |
} | |
aio_opts = { | |
:default_action => 'gem_install', | |
:version => (ENV['PUPPET_AGENT_VERSION'] || '1.1.0'), | |
} | |
hosts_of_type = hosts.group_by {|host| host['type'] } | |
if hosts_of_type['foss'] | |
install_puppet_on(hosts_of_type['foss'], legacy_opts) | |
end | |
if hosts_of_type['aio'] | |
install_puppet_agent_on(hosts_of_type['aio'], aio_opts) | |
end | |
if hosts_of_type['pe'] | |
install_pe_on(hosts_of_type['pe']) | |
end |
Note, there's a lot of, "a 3.x PE agent needs to talk to a 3.x PE master, BUT a FOSS 3.x agent shouldn't talk to a 3.x master, BUT a FOSS 4.x should talk to a PE 4.x master, AND a PE 4.x master should talk to a PE 3.x master". However I don't know how many of those scenarios are actually valid to module workflows should be accounted for in the spec_helper or should be guarded against in the spec helper.
I think it might be better to say,
3.x FOSS agents are valid by themselves (or with a webrick "master") only
4.x FOSS agents (AIO) are valid by themselves, with a 4.x FOSS master (puppetserver), or a PE 4.x master
4.x PE hosts can be by themselves or with AIO agents
PE and FOSS (non-AIO) can never be together however.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do we care about installing a master with AIO? Updating the above with something like:
Should install Puppet Server on the master, if one exists, and its an "aio" host.