diff --git a/.gitignore b/.gitignore index 9b3aa7552..0d8cf080a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ /spec/reports/ /spec/examples.txt /spec/fixtures/configs/debug.log +/spec/fixtures/configs/empty/bolt-debug.log +/spec/fixtures/projects/local/bolt-debug.log +/spec/fixtures/projects/named/bolt-debug.log +/spec/fixtures/projects/embedded/Boltdir/bolt-debug.log /test/tmp/ /test/version_tmp/ /tmp/ @@ -43,6 +47,7 @@ Gemfile.local Boltdir/ bolt.yaml project.yaml +bolt-debug.log acceptance/hosts.yaml diff --git a/Puppetfile b/Puppetfile index e69ef67df..62bc2e590 100644 --- a/Puppetfile +++ b/Puppetfile @@ -6,7 +6,7 @@ moduledir File.join(File.dirname(__FILE__), 'modules') # Core modules used by 'apply' mod 'puppetlabs-service', '3.1.0' -mod 'puppetlabs-puppet_agent', '4.25.0' +mod 'puppet-openvox_bootstrap', '1.1.0' mod 'puppetlabs-facts', '1.7.0' # puppetlabs-puppet_agent deps diff --git a/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb b/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb index 4d4634337..e7d7fe2f2 100644 --- a/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb +++ b/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb @@ -3,13 +3,13 @@ require 'bolt/logger' require 'bolt/task' -# Installs the `puppet-agent` package on targets if needed, then collects facts, +# Installs the `openvox-agent` package on targets if needed, then collects facts, # including any custom facts found in Bolt's module path. The package is # installed using either the configured plugin or the `task` plugin with the -# `puppet_agent::install` task. +# `openvox_bootstrap::install` task. # # Agent installation will be skipped if the target includes the `puppet-agent` -# feature, either as a property of its transport (PCP) or by explicitly setting +# feature, either as a property of its transport or by explicitly setting # it as a feature in Bolt's inventory. # # > **Note:** Not available in apply block diff --git a/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb b/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb index 10e321032..6517a4388 100644 --- a/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb +++ b/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb @@ -6,7 +6,7 @@ # The results are returned as a list of hashes representing each resource. # # Requires the Puppet Agent be installed on the target, which can be accomplished with apply_prep -# or by directly running the `puppet_agent::install` task. In order to be able to reference types without +# or by directly running the `openvox_bootstrap::install` task. In order to be able to reference types without # string quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`), # run the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`. # diff --git a/bolt-modules/boltlib/spec/functions/apply_prep_spec.rb b/bolt-modules/boltlib/spec/functions/apply_prep_spec.rb index 3ce38ed1e..4134eba22 100644 --- a/bolt-modules/boltlib/spec/functions/apply_prep_spec.rb +++ b/bolt-modules/boltlib/spec/functions/apply_prep_spec.rb @@ -37,8 +37,8 @@ let(:unknown_targets) { targets.reject { |target| target.protocol == 'pcp' } } let(:fact) { { 'osfamily' => 'none' } } let(:custom_facts_task) { Bolt::Task.new('custom_facts_task') } - let(:version_task) { Bolt::Task.new('puppet_agent::version') } - let(:install_task) { Bolt::Task.new('puppet_agent::install') } + let(:version_task) { Bolt::Task.new('openvox_bootstrap::check') } + let(:install_task) { Bolt::Task.new('openvox_bootstrap::install') } let(:service_task) { Bolt::Task.new('service') } before(:each) do @@ -48,13 +48,13 @@ targets.each { |t| inventory.set_feature(t, 'puppet-agent', false) } task1 = mock('version_task') - task1.stubs(:task_hash).returns('name' => 'puppet_agent::version') + task1.stubs(:task_hash).returns('name' => 'openvox_bootstrap::check') task1.stubs(:runnable_with?).returns(true) - Puppet::Pal::ScriptCompiler.any_instance.stubs(:task_signature).with('puppet_agent::version').returns(task1) + Puppet::Pal::ScriptCompiler.any_instance.stubs(:task_signature).with('openvox_bootstrap::check').returns(task1) task2 = mock('install_task') - task2.stubs(:task_hash).returns('name' => 'puppet_agent::install') + task2.stubs(:task_hash).returns('name' => 'openvox_bootstrap::install') task2.stubs(:runnable_with?).returns(true) - Puppet::Pal::ScriptCompiler.any_instance.stubs(:task_signature).with('puppet_agent::install').returns(task2) + Puppet::Pal::ScriptCompiler.any_instance.stubs(:task_signature).with('openvox_bootstrap::install').returns(task2) task3 = mock('service_task') task3.stubs(:task_hash).returns('name' => 'service') task3.stubs(:runnable_with?).returns(true) @@ -69,7 +69,7 @@ plugins.expects(:get_hook) .twice - .with("puppet_agent", :puppet_library) + .with("openvox_bootstrap", :puppet_library) .returns(task_hook) is_expected.to run.with_params(hostnames.join(',')) @@ -87,7 +87,7 @@ plugins.expects(:get_hook) .twice - .with("puppet_agent", :puppet_library) + .with("openvox_bootstrap", :puppet_library) .returns(task_hook) is_expected.to run.with_params(hostnames, '_run_as' => 'root') @@ -105,7 +105,7 @@ plugins.expects(:get_hook) .twice - .with("puppet_agent", :puppet_library) + .with("openvox_bootstrap", :puppet_library) .returns(task_hook) is_expected.to run.with_params(hostnames, '_noop' => true) @@ -125,7 +125,7 @@ plugins.expects(:get_hook) .twice - .with("puppet_agent", :puppet_library) + .with("openvox_bootstrap", :puppet_library) .returns(task_hook) is_expected.to run.with_params(hostnames).and_raise_error( @@ -142,7 +142,7 @@ 'plugin_hooks' => { 'puppet_library' => { 'plugin' => 'task', - 'task' => 'puppet_agent::install' + 'task' => 'openvox_bootstrap::install' } } }] @@ -189,7 +189,7 @@ .returns(facts) plugins.expects(:get_hook) - .with('puppet_agent', :puppet_library) + .with('openvox_bootstrap', :puppet_library) .returns(task_hook) is_expected.to run.with_params(hostname) @@ -287,7 +287,7 @@ applicator.stubs(:custom_facts_task).returns(custom_facts_task) plugins.expects(:get_hook) - .with("puppet_agent", :puppet_library) + .with("openvox_bootstrap", :puppet_library) .returns(task_hook) end diff --git a/documentation/applying_manifest_blocks.md b/documentation/applying_manifest_blocks.md index c095b2ad8..acfc86664 100644 --- a/documentation/applying_manifest_blocks.md +++ b/documentation/applying_manifest_blocks.md @@ -33,10 +33,10 @@ Manifest blocks require facts to compile. When Bolt applies Puppet manifests, it automatically installs the packages necessary to run the apply command and gathers facts using [facter](https://puppet.com/docs/facter/latest/), making the facts available to the manifest block. Bolt also identifies targets that do not -have Puppet agents and runs the [`puppet_agent::install` -task](https://forge.puppet.com/puppetlabs/puppet_agent) to install the agent. +have Puppet agents and runs the [`openvox_bootstrap::install` +task](https://forge.puppet.com/puppet/openvox_bootstrap) to install the agent. -> **Note:** Bolt installs the Puppet agent package to enable the use of Puppet +> **Note:** Bolt installs the OpenVox agent package to enable the use of Puppet code. It does not require setting up a server-agent architecture between the remote systems and the local system running Bolt. @@ -240,7 +240,7 @@ access the `logs` key in the report hash: plan example ( TargetSpec $targets ) { - # Install the puppet-agent package and gather facts + # Install the openvox-agent package and gather facts $targets.apply_prep # Apply Puppet code @@ -400,7 +400,7 @@ Create a manifest that sets up a web server with nginx, and run it as a plan. String $site_content = 'hello!', ) { - # Install the puppet-agent package if Puppet is not detected. + # Install the openvox-agent package if Puppet is not detected. # Copy over custom facts from the Bolt modulepath. # Run the `facter` command line tool to gather target information. $targets.apply_prep @@ -479,7 +479,7 @@ Create a manifest that sets up a web server with IIS and run it as a plan. String $site_content = 'hello!', ) { - # Install the puppet-agent package if Puppet is not detected. + # Install the openvox-agent package if Puppet is not detected. # Copy over custom facts from the Bolt modulepath. # Run the `facter` command line tool to gather target information. $targets.apply_prep diff --git a/documentation/bolt_inventory_reference.md b/documentation/bolt_inventory_reference.md index 75bb15804..5cf6cbe4f 100644 --- a/documentation/bolt_inventory_reference.md +++ b/documentation/bolt_inventory_reference.md @@ -55,7 +55,7 @@ level apply to all groups and targets in the inventory file. - **Type:** Array > 🔩 **Tip:** You can set the `puppet-agent` feature to indicate that Bolt -> should skip installing the Puppet agent on all targets when using +> should skip installing the OpenVox agent on all targets when using > `bolt apply` or the `apply_prep` plan function. ```yaml @@ -155,7 +155,7 @@ all groups and targets under the group. - **Type:** Array > 🔩 **Tip:** You can set the `puppet-agent` feature on the group to indicate -> that Bolt should skip installing the Puppet agent on all targets under the +> that Bolt should skip installing the OpenVox agent on all targets under the > group when using `bolt apply` or the `apply_prep` plan function. ```yaml @@ -316,7 +316,7 @@ A list of available features for the target. - **Type:** Array > 🔩 **Tip:** You can set the `puppet-agent` feature on the target to indicate -> that Bolt should skip installing the Puppet agent on the target when using +> that Bolt should skip installing the OpenVox agent on the target when using > `bolt apply` or the `apply_prep` plan function. ```yaml diff --git a/lib/bolt/config/options.rb b/lib/bolt/config/options.rb index 2f52dd1f4..8f606ef78 100644 --- a/lib/bolt/config/options.rb +++ b/lib/bolt/config/options.rb @@ -428,10 +428,12 @@ module Options _example: ["myproject", "myproject::foo", "myproject::bar", "myproject::deploy::*"] }, "plugin-hooks" => { + # rubocop:disable Layout/LineLength description: "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. " \ "The only configurable plugin hook is `puppet_library`, which can use two possible plugins: " \ - "[`puppet_agent`](https://github.com/puppetlabs/puppetlabs-puppet_agent#puppet_agentinstall) " \ + "[`openvox_bootstrap`](https://github.com/voxpupuli/puppet-openvox_bootstrap#openvox_boostrapinstall) " \ "and [`task`](using_plugins.md#task).", + # rubocop:enable Layout/LineLength type: Hash, _plugin: true, _example: { "puppet_library" => { "plugin" => "puppet_agent", "version" => "6.15.0", "_run_as" => "root" } } diff --git a/lib/bolt/pal.rb b/lib/bolt/pal.rb index 523d9d13d..9d9b80f6f 100644 --- a/lib/bolt/pal.rb +++ b/lib/bolt/pal.rb @@ -795,7 +795,7 @@ def plan_hierarchy_lookup(key, plan_vars: {}) end def lookup(key, targets, inventory, executor, plan_vars: {}) - # Install the puppet-agent package and collect facts. Facts are + # Install the openvox-agent package and collect facts. Facts are # automatically added to the targets. in_plan_compiler(executor, inventory, nil) do |compiler| compiler.call_function('apply_prep', targets) diff --git a/lib/bolt/plugin.rb b/lib/bolt/plugin.rb index 3c7807b38..2439d7e45 100644 --- a/lib/bolt/plugin.rb +++ b/lib/bolt/plugin.rb @@ -130,7 +130,7 @@ def boltdir RUBY_PLUGINS = %w[task prompt env_var puppetdb puppet_connect_data].freeze BUILTIN_PLUGINS = %w[task terraform pkcs7 prompt vault aws_inventory puppetdb azure_inventory yaml env_var gcloud_inventory].freeze - DEFAULT_PLUGIN_HOOKS = { 'puppet_library' => { 'plugin' => 'puppet_agent', 'stop_service' => true } }.freeze + DEFAULT_PLUGIN_HOOKS = { 'puppet_library' => { 'plugin' => 'openvox_bootstrap', 'stop_service' => true } }.freeze attr_reader :pal, :plugin_context attr_writer :plugin_hooks diff --git a/pwsh_module/command.tests.ps1 b/pwsh_module/command.tests.ps1 index 07c242cf8..763b01154 100644 --- a/pwsh_module/command.tests.ps1 +++ b/pwsh_module/command.tests.ps1 @@ -256,9 +256,9 @@ Describe "test all bolt command examples" { $result = Get-BoltModule $result | Should -Be 'bolt module show' } - It "bolt module show puppet_agent" { - $result = Get-BoltModule -Name 'puppet_agent' - $result | Should -Be 'bolt module show puppet_agent' + It "bolt module show openvox_bootstrap" { + $result = Get-BoltModule -Name 'openvox_bootstrap' + $result | Should -Be 'bolt module show openvox_bootstrap' } } diff --git a/rakelib/docs.rake b/rakelib/docs.rake index cab404305..71780920e 100644 --- a/rakelib/docs.rake +++ b/rakelib/docs.rake @@ -122,13 +122,22 @@ begin end @local_modules = parser.local_modules.sort.map do |mod| - readme = make_request("https://raw.githubusercontent.com/puppetlabs/bolt/main/modules/#{mod.first}/README.md") - match = readme.match(/## Description(?.*)## Req/m) + # r10k puts git hosted modules under @local_modules, + # handle the ones with local: true as truely local + if mod[1][:local] + readme = make_request("https://raw.githubusercontent.com/puppetlabs/bolt/main/modules/#{mod.first}/README.md") + match = readme.match(/## Description(?.*)## Req/m) + description = match[:desc].strip + url = "https://github.com/puppetlabs/bolt/tree/main/modules/#{mod.first}" + else + description = 'See git repo for details' + url = mod[1][:git] || '' + end { name: mod.first, - description: match[:desc].strip, - url: "https://github.com/puppetlabs/bolt/tree/main/modules/#{mod.first}" + description: description, + url: url } end diff --git a/schemas/bolt-defaults.schema.json b/schemas/bolt-defaults.schema.json index e8c64b119..caa3404cd 100644 --- a/schemas/bolt-defaults.schema.json +++ b/schemas/bolt-defaults.schema.json @@ -235,7 +235,7 @@ } }, "plugin-hooks": { - "description": "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. The only configurable plugin hook is `puppet_library`, which can use two possible plugins: [`puppet_agent`](https://github.com/puppetlabs/puppetlabs-puppet_agent#puppet_agentinstall) and [`task`](using_plugins.md#task).", + "description": "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. The only configurable plugin hook is `puppet_library`, which can use two possible plugins: [`openvox_bootstrap`](https://github.com/voxpupuli/puppet-openvox_bootstrap#openvox_boostrapinstall) and [`task`](using_plugins.md#task).", "oneOf": [ { "type": "object" diff --git a/schemas/bolt-project.schema.json b/schemas/bolt-project.schema.json index 654a11547..4714efabe 100644 --- a/schemas/bolt-project.schema.json +++ b/schemas/bolt-project.schema.json @@ -361,7 +361,7 @@ } }, "plugin-hooks": { - "description": "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. The only configurable plugin hook is `puppet_library`, which can use two possible plugins: [`puppet_agent`](https://github.com/puppetlabs/puppetlabs-puppet_agent#puppet_agentinstall) and [`task`](using_plugins.md#task).", + "description": "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. The only configurable plugin hook is `puppet_library`, which can use two possible plugins: [`openvox_bootstrap`](https://github.com/voxpupuli/puppet-openvox_bootstrap#openvox_boostrapinstall) and [`task`](using_plugins.md#task).", "oneOf": [ { "type": "object" diff --git a/spec/Dockerfile b/spec/Dockerfile index 8bfb0bb09..8b2a8a47c 100644 --- a/spec/Dockerfile +++ b/spec/Dockerfile @@ -15,10 +15,10 @@ ENV LANGUAGE=en_US.UTF-8 # Install the puppet-agent package # sudo is important here so puppet is added to the path RUN if [ -n "$PUPPET_COLLECTION" ]; then \ - wget -q https://apt.puppetlabs.com/${PUPPET_COLLECTION}-release-bionic.deb \ - && sudo dpkg -i ${PUPPET_COLLECTION}-release-bionic.deb \ + wget -q https://apt.voxpupuli.org/${PUPPET_COLLECTION}-release-ubuntu18.04.deb \ + && sudo dpkg -i ${PUPPET_COLLECTION}-release-ubuntu18.04.deb \ && sudo apt-get update \ - && sudo apt-get -y install puppet-agent ; \ + && sudo apt-get -y install openvox-agent ; \ fi # Add 'bolt' user diff --git a/spec/bolt_spec/run_spec.rb b/spec/bolt_spec/run_spec.rb index fa9a224be..f80116476 100644 --- a/spec/bolt_spec/run_spec.rb +++ b/spec/bolt_spec/run_spec.rb @@ -105,7 +105,7 @@ end end - context 'with a target that has a puppet-agent installed' do + context 'with a target that has a openvox-agent installed' do def root_config { 'ssh' => { 'run-as' => 'root', @@ -115,16 +115,15 @@ def root_config end before(:all) do - result = run_task('puppet_agent::version', 'ssh', {}, inventory: conn_inventory, config: root_config) - expect(result.first['status']).to eq('success') - unless result.first['value']['version'] - result = run_task('puppet_agent::install', 'ssh', {}, inventory: conn_inventory, config: root_config) + result = run_task('openvox_bootstrap::check', 'ssh', {}, inventory: conn_inventory, config: root_config) + if result.first['status'] != 'success' + result = run_task('openvox_bootstrap::install', 'ssh', {}, inventory: conn_inventory, config: root_config) + expect(result.first['status']).to eq('success') end - expect(result.first['status']).to eq('success') end after(:all) do - uninstall = '/opt/puppetlabs/bin/puppet resource package puppet-agent ensure=absent' + uninstall = '/opt/puppetlabs/bin/puppet resource package openvox-agent ensure=absent' run_command(uninstall, 'ssh', inventory: conn_inventory, config: root_config) end diff --git a/spec/docker-compose.yml b/spec/docker-compose.yml index 5e910119f..19827f3d5 100644 --- a/spec/docker-compose.yml +++ b/spec/docker-compose.yml @@ -10,7 +10,7 @@ services: build: context: . args: - PUPPET_COLLECTION: puppet7 + PUPPET_COLLECTION: openvox7 container_name: puppet_7_node ports: - "20025:22" diff --git a/spec/integration/apply_error_spec.rb b/spec/integration/apply_error_spec.rb index e836de5f7..c5cf93a78 100644 --- a/spec/integration/apply_error_spec.rb +++ b/spec/integration/apply_error_spec.rb @@ -19,7 +19,7 @@ let(:tflags) { %w[--no-host-key-check] } it 'prints a helpful error if Puppet is not present' do - uninstall = '/opt/puppetlabs/bin/puppet resource package puppet-agent ensure=absent' + uninstall = '/opt/puppetlabs/bin/puppet resource package openvox-agent ensure=absent' run_cli_json(%W[command run #{uninstall} --run-as root --sudo-password #{password}] + config_flags) result = run_cli_json(%w[plan run basic::class] + config_flags) diff --git a/spec/integration/apply_spec.rb b/spec/integration/apply_spec.rb index fa5be613d..85461a457 100644 --- a/spec/integration/apply_spec.rb +++ b/spec/integration/apply_spec.rb @@ -76,7 +76,7 @@ let(:user) { conn_info('ssh')[:user] } let(:password) { conn_info('ssh')[:password] } - # Run tests that require the puppet-agent package to be installed on the target. + # Run tests that require the openvox-agent package to be installed on the target. # Each test is run against all agent targets unless otherwise noted. context 'with puppet installed' do # Set up a project directory for the tests. Include an inventory file so Bolt @@ -307,7 +307,7 @@ end end - # Run tests for installing the puppet-agent package using apply_prep. + # Run tests for installing the openvox-agent package using apply_prep. context 'installing puppet' do let(:config) do { @@ -394,9 +394,9 @@ 'plugin_hooks' => { 'puppet_library' => { 'plugin' => 'task', - 'task' => 'puppet_agent::install', + 'task' => 'openvox_bootstrap::install', 'parameters' => { - 'version' => '7.0.0' + 'version' => '8.19.1' } } } @@ -415,12 +415,12 @@ report = result[0]['value']['report'] expect(report['resource_statuses']).to include("Notify[Hello #{uri}]") - results = run_cli_json(%W[task run puppet_agent::version -t #{uri}], project: project) + results = run_cli_json(%W[task run openvox_bootstrap::check -t #{uri}], project: project) result = results['items'] expect(result.count).to eq(1) expect(result[0]).to include('status' => 'success') - expect(result[0]['value']['version']).to match(/^7\.0/) + expect(result[0]['value']['puppet_version']).to match(/^8\.19/) end end end diff --git a/spec/integration/inventory_spec.rb b/spec/integration/inventory_spec.rb index 3224a40f8..ec17f7538 100644 --- a/spec/integration/inventory_spec.rb +++ b/spec/integration/inventory_spec.rb @@ -683,7 +683,7 @@ def fact_plan(name = 'facts_test') { 'puppet_library' => { 'plugin' => 'task', - 'task' => 'puppet_agent::install', + 'task' => 'openvox_bootstrap::install', 'parameters' => { 'version' => '6.19.0', 'collection' => 'puppet6' diff --git a/spec/integration/plan_spec.rb b/spec/integration/plan_spec.rb index c45086693..08afcfeb1 100644 --- a/spec/integration/plan_spec.rb +++ b/spec/integration/plan_spec.rb @@ -153,7 +153,7 @@ ) end - context 'with puppet-agent installed for get_resources' do + context 'with openvox-agent installed for get_resources' do let(:config_flags) { %W[--project #{@project.path} -m #{modulepath}] } around(:each) do |example| diff --git a/spec/lib/bolt_spec/puppet_agent.rb b/spec/lib/bolt_spec/puppet_agent.rb index f215d4d8f..1b3c4e07e 100644 --- a/spec/lib/bolt_spec/puppet_agent.rb +++ b/spec/lib/bolt_spec/puppet_agent.rb @@ -22,7 +22,7 @@ def uninstall(target, inventory: nil) params = { 'name' => 'puppet', 'action' => 'stop' } run_task('service', target, params, config: config, inventory: inventory) - uninstall = '/opt/puppetlabs/bin/puppet resource package puppet-agent ensure=absent' + uninstall = '/opt/puppetlabs/bin/puppet resource package openvox-agent ensure=absent' run_command(uninstall, target, config: config, inventory: inventory) end @@ -41,7 +41,7 @@ def install(target, collection: nil, inventory: nil) # Task will get latest collection without collection specified task_params = collection ? { 'collection' => collection } : {} - result = run_task('puppet_agent::install', target, task_params, config: config, inventory: inventory) + result = run_task('openvox_bootstrap::install', target, task_params, config: config, inventory: inventory) expect(result.count).to eq(1) expect(result[0]).to include('status' => 'success') diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb index c9b8fc99b..75216c02e 100644 --- a/spec/unit/config_spec.rb +++ b/spec/unit/config_spec.rb @@ -225,7 +225,7 @@ }, 'plugin-hooks' => { 'puppet_library' => { - 'plugin' => 'puppet_agent', + 'plugin' => 'openvox_bootstrap', '_run_as' => 'root' } }, @@ -344,7 +344,7 @@ it 'performs a shallow merge on hash values' do expect(config.plugin_hooks).to eq( 'puppet_library' => { - 'plugin' => 'puppet_agent', + 'plugin' => 'openvox_bootstrap', '_run_as' => 'root' }, 'fake_hook' => { diff --git a/spec/unit/inventory/inventory_spec.rb b/spec/unit/inventory/inventory_spec.rb index 59c891ad9..f0ba7af7f 100644 --- a/spec/unit/inventory/inventory_spec.rb +++ b/spec/unit/inventory/inventory_spec.rb @@ -1274,7 +1274,7 @@ def common_data(transport) 'features' => [], 'groups' => %w[group1 group2 all], 'plugin_hooks' => { - 'puppet_library' => { 'plugin' => 'puppet_agent', 'stop_service' => true } + 'puppet_library' => { 'plugin' => 'openvox_bootstrap', 'stop_service' => true } } } } diff --git a/spec/unit/plugin/puppet_library_spec.rb b/spec/unit/plugin/puppet_library_spec.rb index f2fa5a738..6488b1ea3 100644 --- a/spec/unit/plugin/puppet_library_spec.rb +++ b/spec/unit/plugin/puppet_library_spec.rb @@ -15,7 +15,7 @@ let(:config_data) { { 'modulepath' => modulepath } } let(:library_hook) { - { 'plugin' => 'puppet_agent', + { 'plugin' => 'openvox_bootstrap', '_run_as' => 'me' } } @@ -31,10 +31,10 @@ def capture_opts install_options = nil allow(executor).to receive(:run_task) do |targets, task, _arguments, options| val = case task.name - when "puppet_agent::install" + when "openvox_bootstrap::install" install_options = options {} - when "puppet_agent::version" + when "openvox_bootstrap::check" { "version" => nil } else {} @@ -59,7 +59,7 @@ def capture_opts context 'without _run_as in the module plugin' do let(:library_hook) { - { 'plugin' => 'puppet_agent' } + { 'plugin' => 'openvox_bootstrap' } } it 'runs the correct command' do @@ -71,7 +71,7 @@ def capture_opts context 'without _run_as in the task plugin' do let(:library_hook) { { 'plugin' => 'task', - 'task' => 'puppet_agent::install', + 'task' => 'openvox_bootstrap::install', '_run_as' => 'me' } } @@ -84,7 +84,7 @@ def capture_opts context 'without _run_as in the task plugin' do let(:library_hook) { { 'plugin' => 'task', - 'task' => 'puppet_agent::install' } + 'task' => 'openvox_bootstrap::install' } } it 'runs the correct command' do diff --git a/spec/unit/plugin_spec.rb b/spec/unit/plugin_spec.rb index fe94624d8..f1100c265 100644 --- a/spec/unit/plugin_spec.rb +++ b/spec/unit/plugin_spec.rb @@ -115,7 +115,7 @@ def identity(value, cache = nil) 'param' => 'foobar' }, 'puppet_library' => { - 'plugin' => 'puppet_agent', + 'plugin' => 'openvox_bootstrap', 'stop_service' => true } )