Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29863

Unable to use masked passwords when passing in extra-vars

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
    • Environment:
      Jenkins Version: 1.623
      Ansible Plugin: 0.3.1
      envinject: 1.91.4
      mask-passwords: 2.7.4

      OS:3.4.83-70.111.amzn1.x86_64
      Ansible Version: 1.9.2
    • Similar Issues:

      Description

      I am unable to pass in a masked password as a variable via --extra-vars. I have tried using the EnvInject plugin and the Masked Password plugin to create the variable PASSWORD.

      I then pass it in via

      --etxra-vars="my_password=${PASSWORD}"
      

      When I debug the ansible playbook instead of my_password being the masked value it is "*******".

      It looks like the plugin does not attempt to unmask the variable before passing it to the playbook.

        Attachments

          Activity

          Hide
          johanlorenzo Johan Lorenzo added a comment - - edited

          I came across the exact same issue, right at the same time. The only thing we had in common was the envinject pluging. I rolled it back to v1.90 and the problem is gone. That's a regression in that plugin, then.

          Show
          johanlorenzo Johan Lorenzo added a comment - - edited I came across the exact same issue, right at the same time. The only thing we had in common was the envinject pluging. I rolled it back to v1.90 and the problem is gone. That's a regression in that plugin, then.
          Hide
          hster_investigates H Kim added a comment -

          Hello.

          I was using a simple password parameter and referencing it in the inline inventory content and ran across this problem. I was able to solve this problem by updating envinject to latest 1.92.1

          H

          Show
          hster_investigates H Kim added a comment - Hello. I was using a simple password parameter and referencing it in the inline inventory content and ran across this problem. I was able to solve this problem by updating envinject to latest 1.92.1 H
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jean-Christophe Sirot
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/ansible/AbstractAnsibleInvocation.java
          src/main/java/org/jenkinsci/plugins/ansible/AnsibleAdHocCommandBuilder.java
          src/main/java/org/jenkinsci/plugins/ansible/AnsibleAdHocCommandInvocation.java
          src/main/java/org/jenkinsci/plugins/ansible/AnsiblePlaybookBuilder.java
          src/main/java/org/jenkinsci/plugins/ansible/AnsiblePlaybookInvocation.java
          src/main/java/org/jenkinsci/plugins/ansible/ExtraVar.java
          src/main/java/org/jenkinsci/plugins/ansible/workflow/AnsiblePlaybookStep.java
          src/main/resources/org/jenkinsci/plugins/ansible/AnsibleAdHocCommandBuilder/config.jelly
          src/main/resources/org/jenkinsci/plugins/ansible/AnsiblePlaybookBuilder/config.jelly
          src/main/resources/org/jenkinsci/plugins/ansible/workflow/AnsiblePlaybookStep/config.jelly
          http://jenkins-ci.org/commit/ansible-plugin/b8fc86d508104d494abf99bff125492a193668e1
          Log:
          JENKINS-29863 Add dedicated support for extra variables in build widget and pipeline

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jean-Christophe Sirot Path: pom.xml src/main/java/org/jenkinsci/plugins/ansible/AbstractAnsibleInvocation.java src/main/java/org/jenkinsci/plugins/ansible/AnsibleAdHocCommandBuilder.java src/main/java/org/jenkinsci/plugins/ansible/AnsibleAdHocCommandInvocation.java src/main/java/org/jenkinsci/plugins/ansible/AnsiblePlaybookBuilder.java src/main/java/org/jenkinsci/plugins/ansible/AnsiblePlaybookInvocation.java src/main/java/org/jenkinsci/plugins/ansible/ExtraVar.java src/main/java/org/jenkinsci/plugins/ansible/workflow/AnsiblePlaybookStep.java src/main/resources/org/jenkinsci/plugins/ansible/AnsibleAdHocCommandBuilder/config.jelly src/main/resources/org/jenkinsci/plugins/ansible/AnsiblePlaybookBuilder/config.jelly src/main/resources/org/jenkinsci/plugins/ansible/workflow/AnsiblePlaybookStep/config.jelly http://jenkins-ci.org/commit/ansible-plugin/b8fc86d508104d494abf99bff125492a193668e1 Log: JENKINS-29863 Add dedicated support for extra variables in build widget and pipeline
          Hide
          sirot Jean-Christophe Sirot added a comment -

          Fixed in ansible-plugin 0.5

          Show
          sirot Jean-Christophe Sirot added a comment - Fixed in ansible-plugin 0.5

            People

            • Assignee:
              sirot Jean-Christophe Sirot
              Reporter:
              lucasweb Richard Lucas
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: