Skip to content

Step in plan silently not running when using list of targets #3321

Closed
@WembleyFord2

Description

@WembleyFord2

Describe the Bug

I have a simple plan that does two downloads from targets. This plan works as expected when I list two targets by hostname when invoking the plan. If I provide a list of targets, via -t @list.txt , then only the first download step appears to run. With log-level set to trace, there's no indication that anything is attempting to execute the second step. I have probably missed something obvious and stupid as I am new to bolt, but cannot see what.

Expected Behavior

The second step in my plan should execute.

Steps to Reproduce

My plan is

parameters:
  targets:
    type: TargetSpec
steps:
  - download: '/var/log/test.txt'
    destination: 'logs'
    run_as: root
    targets: $targets
    description: 'Download txt'
  - download: '/var/log/test.json'
    destination: 'json'
    run_as: root
    targets: $targets
    description: 'download json'

The works as I would expect if I use

bolt plan run module::plan -t host1,host2

But only produces any output, only downloads (and completes successfully) performing the first step regarding the .txt file if I use a target file - a flat text file of hostnames, one per line, called with -t@list

The output of trace log does not contain the text 'json' at all.

Environment

Bolt 3.29.0 on Ubuntu mint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBug reports and fixes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions