diff --git a/README.md b/README.md index 7bc4fd0..b6b9d21 100644 --- a/README.md +++ b/README.md @@ -16,23 +16,23 @@ To get outputs [usable in Github Actions](https://docs.github.com/en/free-pro-te ```console $ metadata2gha -puppet_major_versions=[{"name":"Puppet 7","value":7,"collection":"puppet7"},{"name":"Puppet 6","value":6,"collection":"puppet6"}] -puppet_unit_test_matrix=[{"puppet":7,"ruby":"2.7"},{"puppet":6,"ruby":"2.5"}] -github_action_test_matrix=[{"setfile":{"name":"Debian 11","value":"debian11-64"},"puppet":{"name":"Puppet 7","value":7,"collection":"puppet7"}},{"setfile":{"name":"Debian 11","value":"debian11-64"},"puppet":{"name":"Puppet 6","value":6,"collection":"puppet6"}}] +puppet_major_versions=[{"name":"Puppet 8","value":8,"collection":"puppet8"},{"name":"Puppet 7","value":7,"collection":"puppet7"}] +puppet_unit_test_matrix=[{"puppet":8,"ruby":"3.2"},{"puppet":7,"ruby":"2.7"}] +puppet_beaker_test_matrix=[{"name":"Puppet 8 - Debian 12","env":{"BEAKER_PUPPET_COLLECTION":"puppet8","BEAKER_SETFILE":"debian12-64{hostname=debian12-64-puppet8}"}},{"name":"Puppet 7 - Debian 12","env":{"BEAKER_PUPPET_COLLECTION":"puppet7","BEAKER_SETFILE":"debian12-64{hostname=debian12-64-puppet7}"}}] ``` Puppet major versions formatted for readability: ```json [ + { + "name": "Puppet 8", + "value": 8, + "collection": "puppet8" + }, { "name": "Puppet 7", "value": 7, "collection": "puppet7" - }, - { - "name": "Puppet 6", - "value": 6, - "collection": "puppet6" } ] ``` @@ -41,45 +41,37 @@ Puppet unit test matrix formatted for readability: ```json [ { - "puppet": 7, - "ruby": "2.7" + "puppet": 8, + "ruby": "3.2" }, { - "puppet": 6, - "ruby": "2.5" + "puppet": 7, + "ruby": "2.7" } ] ``` -GitHub Action test matrix formatted for readability +Beaker test matrix formatted for readability ```json [ { - "setfile": { - "name": "Debian 11", - "value": "debian11-64" - }, - "puppet": { - "name": "Puppet 7", - "value": 7, - "collection": "puppet7" + "name": "Puppet 8 - Debian 12", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet8", + "BEAKER_SETFILE": "debian12-64{hostname=debian12-64-puppet8}" } }, { - "setfile": { - "name": "Debian 11", - "value": "debian11-64" - }, - "puppet": { - "name": "Puppet 6", - "value": 6, - "collection": "puppet6" + "name": "Puppet 7 - Debian 12", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet7", + "BEAKER_SETFILE": "debian12-64{hostname=debian12-64-puppet7}" } } ] ``` -It is also possible to specify the path to metadata.json and customize the setfiles. For example, to ensure the setfiles use FQDNs and apply the [systemd PIDFile workaround under docker](https://github.com/docker/for-linux/issues/835). This either means either using an older image (CentOS 7, Ubuntu 16.04) or skipping (CentOS 8). +It is possible to specify the path to metadata.json and customize the setfiles. For example, to ensure the setfiles use FQDNs and apply the [systemd PIDFile workaround under docker](https://github.com/docker/for-linux/issues/835). This either means either using an older image (CentOS 7, Ubuntu 16.04) or skipping (CentOS 8). ```console $ metadata2gha --use-fqdn --pidfile-workaround true /path/to/metadata.json @@ -89,21 +81,101 @@ This results in the following JSON data ```json [ { - "name": "CentOS 7", - "value": "centos7-64{hostname=centos7-64.example.com,image=centos:7.6.1810}" + "name": "Puppet 7 - CentOS 7", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet7", + "BEAKER_SETFILE": "centos7-64{hostname=centos7-64-puppet7.example.com,image=centos:7.6.1810}" + } }, { - "name": "Debian 10", - "value": "debian10-64{hostname=debian10-64.example.com}" + "name": "Puppet 7 - Debian 12", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet7", + "BEAKER_SETFILE": "debian12-64{hostname=debian12-64-puppet7.example.com}" + } }, { - "name": "Ubuntu 18.04", - "value": "ubuntu1804-64{hostname=ubuntu1804-64.example.com}" + "name": "Puppet 7 - Ubuntu 22.04", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet7", + "BEAKER_SETFILE": "ubuntu2204-64{hostname=ubuntu2204-64-puppet7.example.com}" + } } ] ``` -It is also possible to specify a comma separated list of operating systems as used in `metadata.json` (`CentOS,Ubuntu`). +If you need custom hostname or multiple hosts in your integration tests this could be achived by using the --beaker-hosts option + +Option argument is 'HOSTNAME:ROLES;HOSTNAME:..;..' where +- hosts are separated by ';' +- host number and roles are separated by ':' +- Roles follow beaker-hostgenerator syntax +If you don't need any extra roles use '1;2;..' + +```console +$ metadata2gha --beaker-hosts 'foo:primary.ma;bar:secondary.a' +``` + +This results in the following JSON data +```json +[ + { + "name": "Puppet 7 - Debian 12", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet7", + "BEAKER_SETFILE": "debian12-64primary.ma{hostname=foo-puppet7}-debian12-64secondary.a{hostname=bar-puppet7}" + } + } +] +``` + +If you need to Expand the matrix ie by product versions it could be achived by using the --beaker-facter option + +Option argument is 'FACT:LABEL:VALUE,VALUE,..' where +- Fact, label and values are separated by ':' +- Values are separated by ',' + +```console +$ metadata2gha --beaker-facter 'mongodb_repo_version:MongoDB:4.4,5.0,6.0,7.0' +``` + +This results in the following JSON data +```json +[ + { + "name": "Puppet 7 - Debian 12 - MongoDB 4.4", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet7", + "BEAKER_SETFILE": "debian12-64{hostname=debian12-64-puppet7}", + "BEAKER_FACTER_mongodb_repo_version": "4.4" + } + }, + { + "name": "Puppet 7 - Debian 12 - MongoDB 5.0", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet7", + "BEAKER_SETFILE": "debian12-64{hostname=debian12-64-puppet7}", + "BEAKER_FACTER_mongodb_repo_version": "5.0" + } + }, + { + "name": "Puppet 7 - Debian 12 - MongoDB 6.0", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet7", + "BEAKER_SETFILE": "debian12-64{hostname=debian12-64-puppet7}", + "BEAKER_FACTER_mongodb_repo_version": "6.0" + } + }, + { + "name": "Puppet 7 - Debian 12 - MongoDB 7.0", + "env": { + "BEAKER_PUPPET_COLLECTION": "puppet7", + "BEAKER_SETFILE": "debian12-64{hostname=debian12-64-puppet7}", + "BEAKER_FACTER_mongodb_repo_version": "7.0" + } + } +] +``` ## Work with the API diff --git a/bin/metadata2gha b/bin/metadata2gha index eb51f97..7897511 100755 --- a/bin/metadata2gha +++ b/bin/metadata2gha @@ -11,6 +11,7 @@ options = { domain: nil, minimum_major_puppet_version: nil, beaker_fact: nil, + beaker_hosts: nil, } OptionParser.new do |opts| @@ -40,6 +41,15 @@ OptionParser.new do |opts| options[:beaker_facter] = [fact, label, values.split(',')] end end + opts.on('--beaker-hosts HOSTNAME:ROLES;HOSTNAME:ROLES;...', 'Expand the setfile string to create multiple hosts with custom roles. Roles string; see beaker-hostgenerator') do |opt| + options[:beaker_hosts] = {} + if opt != 'false' + opt.split(';').each do |host| + hostname, roles = host.split(':', 2) + options[:beaker_hosts][hostname] = roles + end + end + end end.parse! filename = ARGV[0] diff --git a/lib/puppet_metadata/beaker.rb b/lib/puppet_metadata/beaker.rb index 8f55cfb..45bf1dd 100644 --- a/lib/puppet_metadata/beaker.rb +++ b/lib/puppet_metadata/beaker.rb @@ -55,34 +55,69 @@ def adjusted_os(os) # Enforce a domain to be appended to the hostname, making it an FQDN # @param [Optional[String]] puppet_version # The desired puppet version. Will be appended to the hostname + # @param [Optional[Hash]] hosts + # Key: hostname, Value: roles (roles string as defined by beaker-hostgenerator ) + # Override the automatically generated hostname and optionally add roles + # If more than one entry this will generate multiple hosts in the setfile + # The domain may still be set via the `domain` param. # # @return [nil] If no setfile is available # @return [Array<(String, String)>] The beaker setfile description with a readable name - def os_release_to_setfile(os, release, use_fqdn: false, pidfile_workaround: false, domain: nil, puppet_version: nil) + def os_release_to_setfile(os, release, use_fqdn: false, pidfile_workaround: false, domain: nil, puppet_version: nil, hosts: nil) return unless os_supported?(os) aos = adjusted_os(os) - name = "#{aos}#{release.tr('.', '')}-64" - hostname = (puppet_version.nil? && puppet_version != 'none') ? name : "#{name}-#{puppet_version}" + human_name = "#{os} #{release}" domain ||= 'example.com' if use_fqdn - options = {} - options[:hostname] = "#{hostname}.#{domain}" if domain + hosts_settings = [] + if hosts + hosts.each do |hostname, roles| + hosts_settings << { + 'name' => if roles + name + roles + elsif hosts.size > 1 + hosts_settings.empty? ? "#{name}.ma" : "#{name}.a" + else + name + end, + 'hostname' => ((puppet_version.nil? || puppet_version == 'none') ? hostname : "#{hostname}-#{puppet_version}") + (domain ? ".#{domain}" : ''), + } + end + else + hosts_settings << { + 'name' => name, + 'hostname' => if puppet_version && puppet_version != 'none' + "#{name}-#{puppet_version}" + (domain ? ".#{domain}" : '') + elsif domain + name + (domain ? ".#{domain}" : '') + else + '' + end, + } + end + options = {} # Docker messes up cgroups and some systemd versions can't deal with # that when PIDFile is used. + image_to_use = nil if pidfile_workaround?(pidfile_workaround, os) return if PIDFILE_INCOMPATIBLE[os]&.include?(release) if (image = PIDFILE_COMPATIBLE_IMAGES.dig(os, release)) - options[:image] = image + image_to_use = image end end - human_name = "#{os} #{release}" + setfile_parts = [] + hosts_settings.each do |host_settings| + options[:hostname] = host_settings['hostname'] unless host_settings['hostname'].empty? + options[:image] = image_to_use if image_to_use + setfile_parts << build_setfile(host_settings['name'], options) + end - [build_setfile(name, options), human_name] + [setfile_parts.join('-'), human_name] end # Return whether a Beaker setfile can be generated for the given OS diff --git a/lib/puppet_metadata/github_actions.rb b/lib/puppet_metadata/github_actions.rb index 7a05c46..2d94b9e 100644 --- a/lib/puppet_metadata/github_actions.rb +++ b/lib/puppet_metadata/github_actions.rb @@ -144,6 +144,7 @@ def os_release_to_beaker_setfile(os, release, puppet_collection) pidfile_workaround: options[:beaker_pidfile_workaround], domain: options[:domain], puppet_version: puppet_collection, + hosts: options[:beaker_hosts], ) end end diff --git a/spec/beaker_spec.rb b/spec/beaker_spec.rb index 78368dd..103c6d6 100644 --- a/spec/beaker_spec.rb +++ b/spec/beaker_spec.rb @@ -21,7 +21,7 @@ it { expect(described_class.os_release_to_setfile('SLES', '11')).to be_nil } - describe 'pidfile_workaround' do + context 'with pidfile_workaround' do describe 'true' do [ ['CentOS', '6', ['centos6-64', 'CentOS 6']], @@ -57,5 +57,58 @@ it { expect(described_class.os_release_to_setfile('CentOS', '8', pidfile_workaround: ['CentOS'])).to be_nil } end end + + context 'with domain' do + it { + expect(described_class.os_release_to_setfile('CentOS', '7', domain: 'mydomain.org')).to eq(['centos7-64{hostname=centos7-64.mydomain.org}', 'CentOS 7']) + } + end + + context 'with puppet_version' do + [ + ['CentOS', '7', 'none', ['centos7-64', 'CentOS 7']], + ['CentOS', '7', 'puppet7', ['centos7-64{hostname=centos7-64-puppet7}', 'CentOS 7']], + ].each do |os, release, puppet_version, expected| + it { expect(described_class.os_release_to_setfile(os, release, puppet_version: puppet_version)).to eq(expected) } + end + end + + context 'with hosts and no roles' do + [ + ['Debian', '12', { 'foo' => nil }, ['debian12-64{hostname=foo}', 'Debian 12']], + ['Debian', '12', { 'foo' => nil, 'bar' => nil }, ['debian12-64.ma{hostname=foo}-debian12-64.a{hostname=bar}', 'Debian 12']], + ].each do |os, release, hosts, expected| + it { expect(described_class.os_release_to_setfile(os, release, hosts: hosts)).to eq(expected) } + end + end + + context 'with hosts and roles' do + [ + ['Debian', '12', { 'foo' => 'myrole.ma' }, ['debian12-64myrole.ma{hostname=foo}', 'Debian 12']], + ['Debian', '12', { 'foo' => 'myrole,primary.ma' }, ['debian12-64myrole,primary.ma{hostname=foo}', 'Debian 12']], + ['Debian', '12', { 'foo' => 'myrole,primary.ma', 'bar' => 'myrole,secondary.a' }, + ['debian12-64myrole,primary.ma{hostname=foo}-debian12-64myrole,secondary.a{hostname=bar}', 'Debian 12'],], + ].each do |os, release, hosts, expected| + it { expect(described_class.os_release_to_setfile(os, release, hosts: hosts)).to eq(expected) } + end + end + + context 'with hosts, roles and domain' do + [ + ['Debian', '12', 'mydomain.org', { 'foo' => 'myrole,primary.ma', 'bar' => 'myrole,secondary.a' }, + ['debian12-64myrole,primary.ma{hostname=foo.mydomain.org}-debian12-64myrole,secondary.a{hostname=bar.mydomain.org}', 'Debian 12'],], + ].each do |os, release, domain, hosts, expected| + it { expect(described_class.os_release_to_setfile(os, release, domain: domain, hosts: hosts)).to eq(expected) } + end + end + + context 'with hosts, roles, domain and puppet_version' do + [ + ['Debian', '12', 'mydomain.org', 'puppet7', { 'foo' => 'myrole,primary.ma', 'bar' => 'myrole,secondary.a' }, + ['debian12-64myrole,primary.ma{hostname=foo-puppet7.mydomain.org}-debian12-64myrole,secondary.a{hostname=bar-puppet7.mydomain.org}', 'Debian 12'],], + ].each do |os, release, domain, puppet_version, hosts, expected| + it { expect(described_class.os_release_to_setfile(os, release, domain: domain, puppet_version: puppet_version, hosts: hosts)).to eq(expected) } + end + end end end diff --git a/spec/github_actions_spec.rb b/spec/github_actions_spec.rb index be0cde0..4225ed1 100644 --- a/spec/github_actions_spec.rb +++ b/spec/github_actions_spec.rb @@ -123,28 +123,28 @@ it 'is expected to contain supported os / puppet version combinations' do expect(subject).to contain_exactly( { name: 'Distro Puppet - Archlinux rolling', env: { 'BEAKER_PUPPET_COLLECTION' => 'none', 'BEAKER_SETFILE' => 'archlinuxrolling-64' } }, - { name: 'Puppet 5 - CentOS 7', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet5', 'BEAKER_SETFILE' => 'centos7-64' } }, - { name: 'Puppet 6 - CentOS 7', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'centos7-64' } }, - { name: 'Puppet 7 - CentOS 7', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'centos7-64' } }, - { name: 'Puppet 8 - CentOS 7', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'centos7-64' } }, - { name: 'Puppet 5 - CentOS 8', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet5', 'BEAKER_SETFILE' => 'centos8-64' } }, - { name: 'Puppet 6 - CentOS 8', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'centos8-64' } }, - { name: 'Puppet 7 - CentOS 8', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'centos8-64' } }, - { name: 'Puppet 8 - CentOS 8', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'centos8-64' } }, - { name: 'Puppet 6 - CentOS 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'centos9-64' } }, - { name: 'Puppet 7 - CentOS 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'centos9-64' } }, - { name: 'Puppet 8 - CentOS 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'centos9-64' } }, - { name: 'Puppet 5 - Debian 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet5', 'BEAKER_SETFILE' => 'debian9-64' } }, - { name: 'Puppet 6 - Debian 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'debian9-64' } }, - { name: 'Puppet 7 - Debian 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'debian9-64' } }, - { name: 'Puppet 5 - Debian 10', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet5', 'BEAKER_SETFILE' => 'debian10-64' } }, - { name: 'Puppet 6 - Debian 10', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'debian10-64' } }, - { name: 'Puppet 7 - Debian 10', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'debian10-64' } }, - { name: 'Puppet 8 - Debian 10', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'debian10-64' } }, - { name: 'Puppet 7 - Debian 12', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'debian12-64' } }, - { name: 'Puppet 8 - Debian 12', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'debian12-64' } }, - { name: 'Puppet 7 - Fedora 36', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'fedora36-64' } }, - { name: 'Puppet 8 - Fedora 36', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'fedora36-64' } }, + { name: 'Puppet 5 - CentOS 7', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet5', 'BEAKER_SETFILE' => 'centos7-64{hostname=centos7-64-puppet5}' } }, + { name: 'Puppet 6 - CentOS 7', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'centos7-64{hostname=centos7-64-puppet6}' } }, + { name: 'Puppet 7 - CentOS 7', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'centos7-64{hostname=centos7-64-puppet7}' } }, + { name: 'Puppet 8 - CentOS 7', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'centos7-64{hostname=centos7-64-puppet8}' } }, + { name: 'Puppet 5 - CentOS 8', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet5', 'BEAKER_SETFILE' => 'centos8-64{hostname=centos8-64-puppet5}' } }, + { name: 'Puppet 6 - CentOS 8', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'centos8-64{hostname=centos8-64-puppet6}' } }, + { name: 'Puppet 7 - CentOS 8', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'centos8-64{hostname=centos8-64-puppet7}' } }, + { name: 'Puppet 8 - CentOS 8', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'centos8-64{hostname=centos8-64-puppet8}' } }, + { name: 'Puppet 6 - CentOS 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'centos9-64{hostname=centos9-64-puppet6}' } }, + { name: 'Puppet 7 - CentOS 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'centos9-64{hostname=centos9-64-puppet7}' } }, + { name: 'Puppet 8 - CentOS 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'centos9-64{hostname=centos9-64-puppet8}' } }, + { name: 'Puppet 5 - Debian 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet5', 'BEAKER_SETFILE' => 'debian9-64{hostname=debian9-64-puppet5}' } }, + { name: 'Puppet 6 - Debian 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'debian9-64{hostname=debian9-64-puppet6}' } }, + { name: 'Puppet 7 - Debian 9', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'debian9-64{hostname=debian9-64-puppet7}' } }, + { name: 'Puppet 5 - Debian 10', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet5', 'BEAKER_SETFILE' => 'debian10-64{hostname=debian10-64-puppet5}' } }, + { name: 'Puppet 6 - Debian 10', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet6', 'BEAKER_SETFILE' => 'debian10-64{hostname=debian10-64-puppet6}' } }, + { name: 'Puppet 7 - Debian 10', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'debian10-64{hostname=debian10-64-puppet7}' } }, + { name: 'Puppet 8 - Debian 10', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'debian10-64{hostname=debian10-64-puppet8}' } }, + { name: 'Puppet 7 - Debian 12', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'debian12-64{hostname=debian12-64-puppet7}' } }, + { name: 'Puppet 8 - Debian 12', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'debian12-64{hostname=debian12-64-puppet8}' } }, + { name: 'Puppet 7 - Fedora 36', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet7', 'BEAKER_SETFILE' => 'fedora36-64{hostname=fedora36-64-puppet7}' } }, + { name: 'Puppet 8 - Fedora 36', env: { 'BEAKER_PUPPET_COLLECTION' => 'puppet8', 'BEAKER_SETFILE' => 'fedora36-64{hostname=fedora36-64-puppet8}' } }, { name: 'Distro Puppet - Fedora 38', env: { 'BEAKER_PUPPET_COLLECTION' => 'none', 'BEAKER_SETFILE' => 'fedora38-64' } }, { name: 'Distro Puppet - Fedora 40', env: { 'BEAKER_PUPPET_COLLECTION' => 'none', 'BEAKER_SETFILE' => 'fedora40-64' } }, ) @@ -160,6 +160,36 @@ ) end end + + context 'with option beaker_hosts set to one node with custom roles' do + let(:options) { super().merge(beaker_hosts: { 'foo' => 'myrole,primary.ma' }) } + + it 'is expected to contain supported os / puppet version / custom hostname / custom roles' do + expect(subject).to include( + { name: 'Distro Puppet - Archlinux rolling', env: { 'BEAKER_PUPPET_COLLECTION' => 'none', 'BEAKER_SETFILE' => 'archlinuxrolling-64myrole,primary.ma{hostname=foo}' } }, + ) + end + end + + context 'with option beaker_hosts set to two node without custom roles' do + let(:options) { super().merge(beaker_hosts: { 'foo' => nil, 'bar' => nil }) } + + it 'is expected to contain supported os / puppet version / custom hostnames / required roles for multihost' do + expect(subject).to include( + { name: 'Distro Puppet - Archlinux rolling', env: { 'BEAKER_PUPPET_COLLECTION' => 'none', 'BEAKER_SETFILE' => 'archlinuxrolling-64.ma{hostname=foo}-archlinuxrolling-64.a{hostname=bar}' } }, + ) + end + end + + context 'with option beaker_hosts set to two node with custom roles' do + let(:options) { super().merge(beaker_hosts: { 'foo' => 'primary.ma', 'bar' => 'secondary.a' }) } + + it 'is expected to contain supported os / puppet version / custom hostnames / custom roles' do + expect(subject).to include( + { name: 'Distro Puppet - Archlinux rolling', env: { 'BEAKER_PUPPET_COLLECTION' => 'none', 'BEAKER_SETFILE' => 'archlinuxrolling-64primary.ma{hostname=foo}-archlinuxrolling-64secondary.a{hostname=bar}' } }, + ) + end + end end describe 'github_action_test_matrix' do @@ -170,28 +200,28 @@ it 'is expected to contain supported os / puppet version combinations' do expect(subject).to contain_exactly( { name: 'Distro Puppet - Archlinux rolling', setfile: { name: 'Archlinux rolling', value: 'archlinuxrolling-64' }, puppet: { collection: 'none', name: 'Distro Puppet', value: nil } }, - { name: 'Puppet 5 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64' }, puppet: { collection: 'puppet5', name: 'Puppet 5', value: 5 } }, - { name: 'Puppet 6 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 5 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64' }, puppet: { collection: 'puppet5', name: 'Puppet 5', value: 5 } }, - { name: 'Puppet 6 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 6 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 5 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64' }, puppet: { collection: 'puppet5', name: 'Puppet 5', value: 5 } }, - { name: 'Puppet 6 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 5 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { collection: 'puppet5', name: 'Puppet 5', value: 5 } }, - { name: 'Puppet 6 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 7 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 7 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 5 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet5}' }, puppet: { collection: 'puppet5', name: 'Puppet 5', value: 5 } }, + { name: 'Puppet 6 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 5 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64{hostname=centos8-64-puppet5}' }, puppet: { collection: 'puppet5', name: 'Puppet 5', value: 5 } }, + { name: 'Puppet 6 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64{hostname=centos8-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64{hostname=centos8-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64{hostname=centos8-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 6 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64{hostname=centos9-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64{hostname=centos9-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64{hostname=centos9-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 5 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64{hostname=debian9-64-puppet5}' }, puppet: { collection: 'puppet5', name: 'Puppet 5', value: 5 } }, + { name: 'Puppet 6 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64{hostname=debian9-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64{hostname=debian9-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 5 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet5}' }, puppet: { collection: 'puppet5', name: 'Puppet 5', value: 5 } }, + { name: 'Puppet 6 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 7 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64{hostname=debian12-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64{hostname=debian12-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 7 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64{hostname=fedora36-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64{hostname=fedora36-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, { name: 'Distro Puppet - Fedora 38', setfile: { name: 'Fedora 38', value: 'fedora38-64' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 7 } }, { name: 'Distro Puppet - Fedora 40', setfile: { name: 'Fedora 40', value: 'fedora40-64' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 8 } }, ) @@ -203,24 +233,24 @@ it 'is expected to contain supported os / puppet version combinations excluding puppet 5' do expect(subject).to contain_exactly( { name: 'Distro Puppet - Archlinux rolling', setfile: { name: 'Archlinux rolling', value: 'archlinuxrolling-64' }, puppet: { collection: 'none', name: 'Distro Puppet', value: nil } }, - { name: 'Puppet 6 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 6 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 6 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 6 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 6 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 7 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 7 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 6 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 6 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64{hostname=centos8-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64{hostname=centos8-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - CentOS 8', setfile: { name: 'CentOS 8', value: 'centos8-64{hostname=centos8-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 6 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64{hostname=centos9-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64{hostname=centos9-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64{hostname=centos9-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 6 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64{hostname=debian9-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64{hostname=debian9-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 6 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 7 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64{hostname=debian12-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64{hostname=debian12-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 7 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64{hostname=fedora36-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64{hostname=fedora36-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, { name: 'Distro Puppet - Fedora 38', setfile: { name: 'Fedora 38', value: 'fedora38-64' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 7 } }, { name: 'Distro Puppet - Fedora 40', setfile: { name: 'Fedora 40', value: 'fedora40-64' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 8 } }, ) @@ -233,24 +263,24 @@ it 'is expected to contain supported os / puppet version combinations with image option' do expect(subject).to contain_exactly( { name: 'Distro Puppet - Archlinux rolling', setfile: { name: 'Archlinux rolling', value: 'archlinuxrolling-64' }, puppet: { collection: 'none', name: 'Distro Puppet', value: nil } }, - { name: 'Puppet 8 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{image=centos:7.6.1810}' }, puppet: { name: 'Puppet 8', value: 8, collection: 'puppet8' } }, - { name: 'Puppet 7 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{image=centos:7.6.1810}' }, puppet: { name: 'Puppet 7', value: 7, collection: 'puppet7' } }, - { name: 'Puppet 6 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{image=centos:7.6.1810}' }, puppet: { name: 'Puppet 6', value: 6, collection: 'puppet6' } }, - { name: 'Puppet 5 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{image=centos:7.6.1810}' }, puppet: { name: 'Puppet 5', value: 5, collection: 'puppet5' } }, - { name: 'Puppet 6 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, - { name: 'Puppet 7 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Puppet 7 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64' }, puppet: { name: 'Puppet 7', value: 7, collection: 'puppet7' } }, - { name: 'Puppet 6 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64' }, puppet: { name: 'Puppet 6', value: 6, collection: 'puppet6' } }, - { name: 'Puppet 5 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64' }, puppet: { name: 'Puppet 5', value: 5, collection: 'puppet5' } }, - { name: 'Puppet 8 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { name: 'Puppet 8', value: 8, collection: 'puppet8' } }, - { name: 'Puppet 7 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { name: 'Puppet 7', value: 7, collection: 'puppet7' } }, - { name: 'Puppet 6 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { name: 'Puppet 6', value: 6, collection: 'puppet6' } }, - { name: 'Puppet 5 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64' }, puppet: { name: 'Puppet 5', value: 5, collection: 'puppet5' } }, - { name: 'Puppet 7 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64' }, puppet: { name: 'Puppet 7', value: 7, collection: 'puppet7' } }, - { name: 'Puppet 8 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64' }, puppet: { name: 'Puppet 8', value: 8, collection: 'puppet8' } }, - { name: 'Puppet 7 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, - { name: 'Puppet 8 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 8 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet8,image=centos:7.6.1810}' }, puppet: { name: 'Puppet 8', value: 8, collection: 'puppet8' } }, + { name: 'Puppet 7 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet7,image=centos:7.6.1810}' }, puppet: { name: 'Puppet 7', value: 7, collection: 'puppet7' } }, + { name: 'Puppet 6 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet6,image=centos:7.6.1810}' }, puppet: { name: 'Puppet 6', value: 6, collection: 'puppet6' } }, + { name: 'Puppet 5 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet5,image=centos:7.6.1810}' }, puppet: { name: 'Puppet 5', value: 5, collection: 'puppet5' } }, + { name: 'Puppet 6 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64{hostname=centos9-64-puppet6}' }, puppet: { collection: 'puppet6', name: 'Puppet 6', value: 6 } }, + { name: 'Puppet 7 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64{hostname=centos9-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - CentOS 9', setfile: { name: 'CentOS 9', value: 'centos9-64{hostname=centos9-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, + { name: 'Puppet 7 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64{hostname=debian9-64-puppet7}' }, puppet: { name: 'Puppet 7', value: 7, collection: 'puppet7' } }, + { name: 'Puppet 6 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64{hostname=debian9-64-puppet6}' }, puppet: { name: 'Puppet 6', value: 6, collection: 'puppet6' } }, + { name: 'Puppet 5 - Debian 9', setfile: { name: 'Debian 9', value: 'debian9-64{hostname=debian9-64-puppet5}' }, puppet: { name: 'Puppet 5', value: 5, collection: 'puppet5' } }, + { name: 'Puppet 8 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet8}' }, puppet: { name: 'Puppet 8', value: 8, collection: 'puppet8' } }, + { name: 'Puppet 7 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet7}' }, puppet: { name: 'Puppet 7', value: 7, collection: 'puppet7' } }, + { name: 'Puppet 6 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet6}' }, puppet: { name: 'Puppet 6', value: 6, collection: 'puppet6' } }, + { name: 'Puppet 5 - Debian 10', setfile: { name: 'Debian 10', value: 'debian10-64{hostname=debian10-64-puppet5}' }, puppet: { name: 'Puppet 5', value: 5, collection: 'puppet5' } }, + { name: 'Puppet 7 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64{hostname=debian12-64-puppet7}' }, puppet: { name: 'Puppet 7', value: 7, collection: 'puppet7' } }, + { name: 'Puppet 8 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64{hostname=debian12-64-puppet8}' }, puppet: { name: 'Puppet 8', value: 8, collection: 'puppet8' } }, + { name: 'Puppet 7 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64{hostname=fedora36-64-puppet7}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, + { name: 'Puppet 8 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64{hostname=fedora36-64-puppet8}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, { name: 'Distro Puppet - Fedora 38', setfile: { name: 'Fedora 38', value: 'fedora38-64' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 7 } }, { name: 'Distro Puppet - Fedora 40', setfile: { name: 'Fedora 40', value: 'fedora40-64' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 8 } }, ) @@ -262,7 +292,7 @@ it 'is expected to contain supported os / puppet version combinations with hostname option' do expect(subject).to contain_exactly( - { name: 'Distro Puppet - Archlinux rolling', setfile: { name: 'Archlinux rolling', value: 'archlinuxrolling-64{hostname=archlinuxrolling-64-none.example.com}' }, puppet: { collection: 'none', name: 'Distro Puppet', value: nil } }, + { name: 'Distro Puppet - Archlinux rolling', setfile: { name: 'Archlinux rolling', value: 'archlinuxrolling-64{hostname=archlinuxrolling-64.example.com}' }, puppet: { collection: 'none', name: 'Distro Puppet', value: nil } }, { name: 'Puppet 8 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet8.example.com}' }, puppet: { name: 'Puppet 8', value: 8, collection: 'puppet8' } }, { name: 'Puppet 7 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet7.example.com}' }, puppet: { name: 'Puppet 7', value: 7, collection: 'puppet7' } }, { name: 'Puppet 6 - CentOS 7', setfile: { name: 'CentOS 7', value: 'centos7-64{hostname=centos7-64-puppet6.example.com}' }, puppet: { name: 'Puppet 6', value: 6, collection: 'puppet6' } }, @@ -285,8 +315,8 @@ { name: 'Puppet 8 - Debian 12', setfile: { name: 'Debian 12', value: 'debian12-64{hostname=debian12-64-puppet8.example.com}' }, puppet: { name: 'Puppet 8', value: 8, collection: 'puppet8' } }, { name: 'Puppet 7 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64{hostname=fedora36-64-puppet7.example.com}' }, puppet: { collection: 'puppet7', name: 'Puppet 7', value: 7 } }, { name: 'Puppet 8 - Fedora 36', setfile: { name: 'Fedora 36', value: 'fedora36-64{hostname=fedora36-64-puppet8.example.com}' }, puppet: { collection: 'puppet8', name: 'Puppet 8', value: 8 } }, - { name: 'Distro Puppet - Fedora 38', setfile: { name: 'Fedora 38', value: 'fedora38-64{hostname=fedora38-64-none.example.com}' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 7 } }, - { name: 'Distro Puppet - Fedora 40', setfile: { name: 'Fedora 40', value: 'fedora40-64{hostname=fedora40-64-none.example.com}' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 8 } }, + { name: 'Distro Puppet - Fedora 38', setfile: { name: 'Fedora 38', value: 'fedora38-64{hostname=fedora38-64.example.com}' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 7 } }, + { name: 'Distro Puppet - Fedora 40', setfile: { name: 'Fedora 40', value: 'fedora40-64{hostname=fedora40-64.example.com}' }, puppet: { collection: 'none', name: 'Distro Puppet', value: 8 } }, ) end end