# Plugin lists do not work

**URL:** <https://forum.buildkite.community/t/plugin-lists-do-not-work/528>\
**Category:** General\
**Created:** [May 29, 2019, 4:21pm UTC](https://forum.buildkite.community/t/plugin-lists-do-not-work/528 "2019-05-29T16:21:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [May 29, 2019, 4:21pm UTC](https://forum.buildkite.community/t/plugin-lists-do-not-work/528/1 "2019-05-29T16:21:19Z")

</div>

Related to [No basic auth credentials, yet using ECR plugin](https://forum.buildkite.community/t/no-basic-auth-credentials-yet-using-ecr-plugin/149)

I’m opening this as another buildkite user on the Veertu slack channel was trying to use the anka plugin and seeing the problem.

Problem: Using a list of plugins does not work.

```auto
steps:
  - label: Run target
    command: whoami
    plugins:
      - chef/anka#v0.5.0:
        vm-name: bk-macos-1551961510
        debug: true
    <<: *anka

```

The user logs show:

```auto
:anka: Pulling from Anka Registry
-anka: action failed
🚨 Error: The command exited with status 70
Running plugin anka pre-exit hook
:anka: Cleaning up clone
Error: no such option: -0
🚨 Error: Error tearing down bootstrap: The plugin anka pre-exit hook exited with status 2

```

But the plugin should echo the vm-name as it’s using `echo "--- :anka: Pulling $(plugin_read_config VM_NAME) from Anka Registry"`

Solution: Don’t use a list.

```auto
steps:
  - label: Run target
    command: whoami
    plugins:
      chef/anka#v0.5.0:
        vm-name: bk-macos-1551961510
        debug: true
    <<: *anka

```

This is the same if I use the docker plugin too.

---

<div class="post-metadata">

**Author:** ![anon46008679](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@anon46008679](https://forum.buildkite.community/u/anon46008679)\
**Post date:** [May 29, 2019, 9:04pm UTC](https://forum.buildkite.community/t/plugin-lists-do-not-work/528/2 "2019-05-29T21:04:08Z")

</div>

Sorry you’ve had trouble getting that working @nathan.pierce.

It looks like you might be missing one level of indentation on the array style syntax.

Can you give the following a go:

```auto
steps:
  - label: Run target
    command: whoami
    plugins:
      - chef/anka#v0.5.0:
          vm-name: bk-macos-1551961510
          debug: true
    <<: *anka

```

---

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [May 29, 2019, 9:53pm UTC](https://forum.buildkite.community/t/plugin-lists-do-not-work/528/3 "2019-05-29T21:53:11Z")

</div>

Thanks Tim! Just to be sure I understand: four spaces is needed?

---

<div class="post-metadata">

**Author:** ![anon46008679](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@anon46008679](https://forum.buildkite.community/u/anon46008679)\
**Post date:** [May 30, 2019, 1:08am UTC](https://forum.buildkite.community/t/plugin-lists-do-not-work/528/4 "2019-05-30T01:08:58Z")

</div>

Yep! The structure needs to end up as:

```json
{
  "steps": [
    {
      "label": "Run target", 
      "command": "whoami", 
      "plugins": [
        {
          "chef/anka#v0.5.0": {
            "debug": true, 
            "vm-name": "bk-macos-1551961510"
          }
        }
      ]
    }
  ]
}

```

…rather than the incorrect, non-nested version, which would be:

```json
{
  "steps": [
    {
      "label": "Run target", 
      "command": "whoami", 
      "plugins": [
        {
          "debug": true, 
          "chef/anka#v0.5.0": null, 
          "vm-name": "bk-macos-1551961510"
        }
      ]
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [May 30, 2019, 6:25pm UTC](https://forum.buildkite.community/t/plugin-lists-do-not-work/528/5 "2019-05-30T18:25:06Z")

</div>

Works, thanks! The documentation I was using for some plugins didn’t make it clear there are four spaces needed.
