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

Ansible plugin not reading environment variables

XMLWordPrintable

      Hello,

       

      I'm trying to read the $BRANCH_NAME env vars in my playbook, just like the Wiki example, but it's empty.

        

      - hosts: "{{ lookup('env','BRANCH_NAME') }}"
        gather_facts: false
      

       

      I'll use the branch name to update some files on target host. Is the any special setup in Ansible or Jenkins for this case? I've tried also with "gather_facts: true" but without success.

            rbbrasil Rodrigo Brasil
            rbbrasil Rodrigo Brasil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: