{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/tower-cli/issues/44","labels_url":"https://api.github.com/repos/ansible/tower-cli/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/ansible/tower-cli/issues/44/comments","events_url":"https://api.github.com/repos/ansible/tower-cli/issues/44/events","html_url":"https://github.com/ansible/tower-cli/issues/44","id":66944111,"number":44,"title":"Passing extra vars overwrites tower extra vars","user":{"login":"michaelsharpe","id":2397603,"avatar_url":"https://avatars.githubusercontent.com/u/2397603?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelsharpe","html_url":"https://github.com/michaelsharpe","followers_url":"https://api.github.com/users/michaelsharpe/followers","following_url":"https://api.github.com/users/michaelsharpe/following{/other_user}","gists_url":"https://api.github.com/users/michaelsharpe/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsharpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsharpe/subscriptions","organizations_url":"https://api.github.com/users/michaelsharpe/orgs","repos_url":"https://api.github.com/users/michaelsharpe/repos","events_url":"https://api.github.com/users/michaelsharpe/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsharpe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/tower-cli/labels/P2","name":"P2","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-07T17:28:03Z","updated_at":"2015-09-21T20:55:54Z","closed_at":null,"body":"I am currently utilizing the tower-cli to launch a job from circleCI.  I have an grunt task to create a file with the build number so my instances can pull down a tarball of the code generated as a build artifact.  \r\n\r\nWhen I use this file as an 'extra-vars' option to pass this build number, it overwrites the extra-vars that I have defined ob my job template on the tower.\r\n\r\nIs there any way around this, or a better strategy to take to get the build number from circle ci to the tower?"},"comment":{"url":"https://api.github.com/repos/ansible/tower-cli/issues/comments/142105860","html_url":"https://github.com/ansible/tower-cli/issues/44#issuecomment-142105860","issue_url":"https://api.github.com/repos/ansible/tower-cli/issues/44","id":142105860,"user":{"login":"tomfotherby","id":140179,"avatar_url":"https://avatars.githubusercontent.com/u/140179?v=3","gravatar_id":"","url":"https://api.github.com/users/tomfotherby","html_url":"https://github.com/tomfotherby","followers_url":"https://api.github.com/users/tomfotherby/followers","following_url":"https://api.github.com/users/tomfotherby/following{/other_user}","gists_url":"https://api.github.com/users/tomfotherby/gists{/gist_id}","starred_url":"https://api.github.com/users/tomfotherby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomfotherby/subscriptions","organizations_url":"https://api.github.com/users/tomfotherby/orgs","repos_url":"https://api.github.com/users/tomfotherby/repos","events_url":"https://api.github.com/users/tomfotherby/events{/privacy}","received_events_url":"https://api.github.com/users/tomfotherby/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T20:55:54Z","updated_at":"2015-09-21T20:55:54Z","body":"Hi @michaelsharpe ,\r\n\r\nI had the same problem with Tower CLI 2.1.1. I found I could make a small change to `lib/tower_cli/resources/job.py` and change line 80 from:\r\n\r\n    data['extra_vars'] = extra_vars\r\n\r\nto\r\n\r\n    data['extra_vars'] = data['extra_vars']+extra_vars\r\n\r\nIn Ubuntu 14.04, this is located at `/usr/local/lib/python2.7/dist-packages/tower_cli/resources/job.py`. \r\n\r\nOnce this was done, I could invoke `tower-cli` passing in extra vars using:\r\n\r\n    $tower-cli job launch --job-template=48 --extra-vars=<(echo \"version: 161\")\r\n\r\nHopefully with a future release, such a hack won't be needed."}}