Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't merge name => all to inventoryfile before resolving reference #2475

Closed
lucywyman opened this issue Dec 14, 2020 · 0 comments · Fixed by #2503
Closed

Don't merge name => all to inventoryfile before resolving reference #2475

lucywyman opened this issue Dec 14, 2020 · 0 comments · Fixed by #2503
Assignees
Labels
Bug Bug reports and fixes.

Comments

@lucywyman
Copy link
Contributor

lucywyman commented Dec 14, 2020

Describe the Bug

Bolt should support an inventoryfile that only contains a plugin reference:

---
_plugin: yaml
filepath: ../bolt/inventory.yaml

Additional context

The inventory schema will also need to be updated to accept a plugin at the top level.

@lucywyman lucywyman added the Bug Bug reports and fixes. label Dec 14, 2020
@beechtom beechtom added this to 📝 To Do in Bolt Kanban via automation Dec 18, 2020
@beechtom beechtom self-assigned this Dec 18, 2020
@beechtom beechtom moved this from 📝 To Do to ⚡️ Doing in Bolt Kanban Dec 18, 2020
beechtom added a commit to beechtom/bolt that referenced this issue Dec 18, 2020
This change allows an entire inventory to be a plugin reference. For
exmaple, the following inventory was previously invalid:

```yaml
---
_plugin: yaml
filepath: /path/to/inventory_partial.yaml
```

A top-level plugin like this used to be invalid as Bolt automatically
added `'name' => 'all'` to the top of the loaded inventory, which would
cause a plugin to receive a `name` parameter and (likely) error. Now,
Bolt will resolve a top-level plugin reference, validate that the
resolved data does not include a `name` key, and then merge in `'name'
=> 'all'`.

!bug

* **Allow entire inventory to be specified with a plugin**
  ([puppetlabs#2475](puppetlabs#2475))

  Inventory files can now be specified with a plugin. For example, the
  following inventory file is now valid:

  ```yaml
  ---
  _plugin: yaml
  filepath: /path/to/inventory_partial.yaml
  ```
beechtom added a commit to beechtom/bolt that referenced this issue Dec 18, 2020
This change allows an entire inventory to be a plugin reference. For
exmaple, the following inventory was previously invalid:

```yaml
---
_plugin: yaml
filepath: /path/to/inventory_partial.yaml
```

A top-level plugin like this used to be invalid as Bolt automatically
added `'name' => 'all'` to the top of the loaded inventory, which would
cause a plugin to receive a `name` parameter and (likely) error. Now,
Bolt will resolve a top-level plugin reference, validate that the
resolved data does not include a `name` key, and then merge in `'name'
=> 'all'`.

!bug

* **Allow entire inventory to be specified with a plugin**
  ([puppetlabs#2475](puppetlabs#2475))

  Inventory files can now be specified with a plugin. For example, the
  following inventory file is now valid:

  ```yaml
  ---
  _plugin: yaml
  filepath: /path/to/inventory_partial.yaml
  ```
beechtom added a commit to beechtom/bolt that referenced this issue Dec 18, 2020
This change allows an entire inventory to be a plugin reference. For
exmaple, the following inventory was previously invalid:

```yaml
---
_plugin: yaml
filepath: /path/to/inventory_partial.yaml
```

A top-level plugin like this used to be invalid as Bolt automatically
added `'name' => 'all'` to the top of the loaded inventory, which would
cause a plugin to receive a `name` parameter and (likely) error. Now,
Bolt will resolve a top-level plugin reference, validate that the
resolved data does not include a `name` key, and then merge in `'name'
=> 'all'`.

!bug

* **Allow entire inventory to be specified with a plugin**
  ([puppetlabs#2475](puppetlabs#2475))

  Inventory files can now be specified with a plugin. For example, the
  following inventory file is now valid:

  ```yaml
  ---
  _plugin: yaml
  filepath: /path/to/inventory_partial.yaml
  ```
@beechtom beechtom linked a pull request Dec 18, 2020 that will close this issue
beechtom added a commit to beechtom/bolt that referenced this issue Dec 18, 2020
This change allows an entire inventory to be a plugin reference. For
exmaple, the following inventory was previously invalid:

```yaml
---
_plugin: yaml
filepath: /path/to/inventory_partial.yaml
```

A top-level plugin like this used to be invalid as Bolt automatically
added `'name' => 'all'` to the top of the loaded inventory, which would
cause a plugin to receive a `name` parameter and (likely) error. Now,
Bolt will resolve a top-level plugin reference, validate that the
resolved data does not include a `name` key, and then merge in `'name'
=> 'all'`.

!bug

* **Allow entire inventory to be specified with a plugin**
  ([puppetlabs#2475](puppetlabs#2475))

  Inventory files can now be specified with a plugin. For example, the
  following inventory file is now valid:

  ```yaml
  ---
  _plugin: yaml
  filepath: /path/to/inventory_partial.yaml
  ```
@beechtom beechtom moved this from ⚡️ Doing to 🚧 Reviewing in Bolt Kanban Dec 18, 2020
beechtom added a commit to beechtom/bolt that referenced this issue Jan 4, 2021
This change allows an entire inventory to be a plugin reference. For
exmaple, the following inventory was previously invalid:

```yaml
---
_plugin: yaml
filepath: /path/to/inventory_partial.yaml
```

A top-level plugin like this used to be invalid as Bolt automatically
added `'name' => 'all'` to the top of the loaded inventory, which would
cause a plugin to receive a `name` parameter and (likely) error. Now,
Bolt will resolve a top-level plugin reference, validate that the
resolved data does not include a `name` key, and then merge in `'name'
=> 'all'`.

!bug

* **Allow entire inventory to be specified with a plugin**
  ([puppetlabs#2475](puppetlabs#2475))

  Inventory files can now be specified with a plugin. For example, the
  following inventory file is now valid:

  ```yaml
  ---
  _plugin: yaml
  filepath: /path/to/inventory_partial.yaml
  ```
beechtom added a commit to beechtom/bolt that referenced this issue Jan 5, 2021
This change allows an entire inventory to be a plugin reference. For
exmaple, the following inventory was previously invalid:

```yaml
---
_plugin: yaml
filepath: /path/to/inventory_partial.yaml
```

A top-level plugin like this used to be invalid as Bolt automatically
added `'name' => 'all'` to the top of the loaded inventory, which would
cause a plugin to receive a `name` parameter and (likely) error. Now,
Bolt will resolve a top-level plugin reference, validate that the
resolved data does not include a `name` key, and then merge in `'name'
=> 'all'`.

!bug

* **Allow entire inventory to be specified with a plugin**
  ([puppetlabs#2475](puppetlabs#2475))

  Inventory files can now be specified with a plugin. For example, the
  following inventory file is now valid:

  ```yaml
  ---
  _plugin: yaml
  filepath: /path/to/inventory_partial.yaml
  ```
lucywyman added a commit that referenced this issue Jan 5, 2021
(GH-2475) Allow entire inventory to be a plugin reference
@lucywyman lucywyman removed this from 🚧 Reviewing in Bolt Kanban Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug reports and fixes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants