Uploaded image for project: 'Puppet Task Runner'
  1. Puppet Task Runner
  2. BOLT-190

Tasks in subfolders of a module are incorrectly loaded from plans

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: BOLT 0.4.1
    • Fix Version/s: BOLT 0.6.0
    • Component/s: CLI
    • Environment:

      Client: Fedora26, ruby 2.4.1p111

    • Template:
    • Sprint:
      Bolt Kanban
    • Method Found:
      Needs Assessment
    • Release Notes:
      Known Issue
    • Release Notes Summary:
      Hide
      Bolt cannot find and load tasks located in module subdire​ctories. For example, Bolt could run a task located in `./tasks/mytask.sh`, but not one located in `​./tasks/examples/mytask.sh` .

      The release note field should be updated to 'bug fix' (if appropriate) when the ticket is fixed
      Show
      Bolt cannot find and load tasks located in module subdire​ctories. For example, Bolt could run a task located in `./tasks/mytask.sh`, but not one located in `​./tasks/examples/mytask.sh` . The release note field should be updated to 'bug fix' (if appropriate) when the ticket is fixed
    • QA Risk Assessment:
      Needs Assessment

      Description

      Despite the documentation here: https://puppet.com/docs/bolt/0.x/writing_tasks.html, having a task in a subdirectory of the tasks module doesn't seem to work. For example, I added a task under /<environment>/modules/profiles/tasks/example/showme.sh with contents:

      #/usr/bin/env bash
      echo $0
      

      Then, from the modules folder tried running this:

      bolt task run -n ssh://ex-01 --modules=. profiles::example::showme -k
      

      And was rewarded with this error:

      /home/bwulf/.gem/ruby/2.4.0/gems/bolt-0.6.0/vendored/puppet/lib/puppet/info_service/task_information_service.rb:26:in `task_data': Task profiles::example::showme not found in module profiles. (Puppet::Module::Task::TaskNotFound)
      	from /home/bwulf/.gem/ruby/2.4.0/gems/bolt-0.6.0/lib/bolt/cli.rb:408:in `block in load_task_data'
      	from /home/bwulf/.gem/ruby/2.4.0/gems/bolt-0.6.0/vendored/puppet/lib/puppet/context.rb:65:in `override'
      	from /home/bwulf/.gem/ruby/2.4.0/gems/bolt-0.6.0/vendored/puppet/lib/puppet.rb:264:in `override'
      	from /home/bwulf/.gem/ruby/2.4.0/gems/bolt-0.6.0/lib/bolt/cli.rb:407:in `load_task_data'
      	from /home/bwulf/.gem/ruby/2.4.0/gems/bolt-0.6.0/lib/bolt/cli.rb:336:in `block in execute'
      	from /usr/share/ruby/benchmark.rb:308:in `realtime'
      	from /home/bwulf/.gem/ruby/2.4.0/gems/bolt-0.6.0/lib/bolt/cli.rb:326:in `execute'
      	from /home/bwulf/.gem/ruby/2.4.0/gems/bolt-0.6.0/exe/bolt:9:in `<top (required)>'
      	from /home/bwulf/bin/bolt:23:in `load'
      	from /home/bwulf/bin/bolt:23:in `<main>'
      

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                mrwulf Brandon Wulf
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support