Jira (BOLT-1470) Plugin parameters can't use other plugins to get data

10 views
Skip to first unread message

Lucy Wyman (JIRA)

unread,
Jul 11, 2019, 11:16:03 AM7/11/19
to puppe...@googlegroups.com
Lucy Wyman created an issue
 
Puppet Task Runner / Task BOLT-1470
Plugin parameters can't use other plugins to get data
Issue Type: Task Task
Assignee: Unassigned
Created: 2019/07/11 8:15 AM
Priority: Normal Normal
Reporter: Lucy Wyman

Builtin plugins can't use other plugins to populate their data values. For example, the parameters key for the task plugin can't use the prompt or pkcs7 plugins to hide secret parameters.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Nick Maludy (JIRA)

unread,
Jul 11, 2019, 12:31:02 PM7/11/19
to puppe...@googlegroups.com
Nick Maludy commented on Task BOLT-1470
 
Re: Plugin parameters can't use other plugins to get data

Here's an example inventory file for using a task plugin to retrieve config data and/or inventory.

 

The task i'm calling out to for config data accesses HashiCorp Vault and requires a secret API key and/or secret creds

 

The task for calling out to Foreman for targets uses the API and requires a username/password to authenticate.

 

version: 2
config:
  ssh:
    _plugin: task
    task: vault::bolt_ssh_config_lookup
    parameters:
      token:
        _plugin: pkcs7
        value: super secret thing
  winrm:
    _plugin: task
    task: vault::bolt_winrm_config_lookup
    parameters:
      auth_backend: activedirectory
      username: svc_bolt_vault@domain.tld
      password:
        _plugin: pkcs7
        value: super secret password
 
groups:
        
  - name: linux
    targets:
      _plugin: task
      task: foreman::groups
      parameters:
        # These parameters are specific to the task
        server: foreman.domain.tld
        username: bolt_user
        password:
          _plugin: pcks7
          value: xxx

Lucy Wyman (JIRA)

unread,
Aug 13, 2019, 12:49:03 PM8/13/19
to puppe...@googlegroups.com
Lucy Wyman updated an issue
 
Change By: Lucy Wyman
Builtin plugins can't use other plugins to populate their data values. For example, the parameters key for the task plugin can't use the prompt or pkcs7 plugins to hide secret parameters.


 

Plugins should be able to be used in the config file. Plugin config should be loaded at start time, and plugin config should be loaded if it's referred to (depended on) by another plugin when it's referred to. It should error if there's a dependency loop. This applies to both config and inventory plugin hooks.

 

Rename inventory_config and inventory_targets hooks to lookup

Lucy Wyman (JIRA)

unread,
Aug 13, 2019, 12:53:03 PM8/13/19
to puppe...@googlegroups.com
Lucy Wyman updated an issue
Builtin plugins can't use other plugins to populate their data values. For example, the parameters key for the task plugin can't use the prompt or pkcs7 plugins to hide secret parameters.

 

Plugins should be able to be used in the config file. Plugin config should be loaded at start time, and plugin config should be loaded if it's referred to (depended on) by another plugin when it's referred to. It should error if there's a dependency loop. This applies to both config and inventory plugin hooks.

 

Rename ` inventory_config ` and ` inventory_targets ` hooks to ` lookup `. Module tasks (link) depend on this change.

Lucy Wyman (JIRA)

unread,
Aug 13, 2019, 1:41:02 PM8/13/19
to puppe...@googlegroups.com
Lucy Wyman updated an issue
Builtin plugins can't use other plugins to populate their data values. For example, the parameters key for the task plugin can't use the prompt or pkcs7 plugins to hide secret parameters.

 

Plugins should be able to be used in the config file. Plugin config should be loaded at start time, and plugin config should be loaded if it's referred to (depended on) by another plugin when it's referred to. It should error if there's a dependency loop. This applies to both config and inventory plugin hooks.


Rename `inventory_config` and `inventory_targets` hooks to `lookup`. Module tasks (link) depend on this change.

Yaml keys cannot be lookedup by a plugin. Groups can be looked up. Plugins can return other plugins, which will be evaluated. Features should be lazy loaded, everything else should be loaded at start time.
Reply all
Reply to author
Forward
0 new messages