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

Ansible Playbook Syntax Generator Does Not Generate 'become' Option

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: ansible-plugin
    • Labels:
      None
    • Environment:
      ansible-plugin 0.8.0
    • Similar Issues:

      Description

      The become option should be included in the snippet generator when it is checked but it does not.

      • The workaround is to manually include the option 'become: true' in a pipeline script

      becomeUser and sudoUser should receive their default values by default too. The current version generates null as the users by default which is likely to cause issues.

      • The workaround is to not include the generated 'becomeUser: null' and 'sudoUser: null' options if the user 'root' is desired

        Attachments

          Issue Links

            Activity

            michaelcresswell Michael Cresswell created issue -
            michaelcresswell Michael Cresswell made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            michaelcresswell Michael Cresswell made changes -
            Link This issue is related to JENKINS-48498 [ JENKINS-48498 ]
            michaelcresswell Michael Cresswell made changes -
            Description The become option should be included in the snippet generator when it is checked but it does not.

             

            becomeUser and sudoUser should receive their default values by default too. The current version generates null as the users by default which is likely to cause issues.
            The become option should be included in the snippet generator when it is checked but it does not.
             * The workaround is to manually include the option 'become: true' in a pipeline script

            becomeUser and sudoUser should receive their default values by default too. The current version generates null as the users by default which is likely to cause issues.
             * The workaround is to not include the generated 'becomeUser: null' and 'sudoUser: null' options if the user 'root' is desired
            michaelcresswell Michael Cresswell made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            Show
            michaelcresswell Michael Cresswell added a comment - Fixed in https://github.com/jenkinsci/ansible-plugin/pull/20
            michaelcresswell Michael Cresswell made changes -
            Assignee Michael Cresswell [ michaelcresswell ] Emilio Escobar [ escoem ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: michaelcresswell
            Path:
            src/main/java/org/jenkinsci/plugins/ansible/workflow/AnsiblePlaybookStep.java
            src/main/resources/org/jenkinsci/plugins/ansible/workflow/AnsiblePlaybookStep/config.jelly
            http://jenkins-ci.org/commit/ansible-plugin/46b2ce13cd84c4db3368eadb9218629eed3d0636
            Log:
            [FIXED JENKINS-49061] Syntax Generator Does Not Generate 'become' Option (#20)

            Add @DataBoundSetter to setter method.
            Add default values for becomeUser and sudoUser to avoid generating misleading snippet.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: michaelcresswell Path: src/main/java/org/jenkinsci/plugins/ansible/workflow/AnsiblePlaybookStep.java src/main/resources/org/jenkinsci/plugins/ansible/workflow/AnsiblePlaybookStep/config.jelly http://jenkins-ci.org/commit/ansible-plugin/46b2ce13cd84c4db3368eadb9218629eed3d0636 Log: [FIXED JENKINS-49061] Syntax Generator Does Not Generate 'become' Option (#20) Add @DataBoundSetter to setter method. Add default values for becomeUser and sudoUser to avoid generating misleading snippet.
            escoem Emilio Escobar made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]

              People

              • Assignee:
                escoem Emilio Escobar
                Reporter:
                michaelcresswell Michael Cresswell
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: