jenkinsci/ansible-plugin

Allow for stringParams in vaultCredentialsId

Closed this issue · 2 comments

What feature do you want to see added?

For the sake of re-usability, I'd like to be able configure freeStyleJobs that invoke an ansiblePlaybook via

job('My_Job') {
    steps {
            ansiblePlaybook('path/to/my/playbook.yml') {
                inventoryPath('${inventory_repository}/inventory.yml')
                vaultCredentialsId('${vault_credentials_id}')
            }
    }
    parameters {
        stringParam('inventory_repository')
        stringParam('vault_credentials_id')
    }
}

where both inventory_repository and vault_credentials_id are provided at build-time only.

While this works fine for inventoryPath, it does not for vaultCredentialsId (after processing the provided JobDSL file, the vault credentials setting in the Drop-Down menu is set to - current -.

Upstream changes

No response

Hi,

This will be fixed by #166

I would like to perform a release before (in case I need to rollback). But normally it should not have any side effect.

Also configured with automated tests.

Expected a release if some days.

Regards,

@ernstvonoelsen Implemented on 301.v29a_7f9b_0d820

Can you confirm it works for you ?

Regards,