{"action":"created","comment":{"url":"https://api.github.com/repos/StackStorm/st2contrib/pulls/comments/41173875","id":41173875,"diff_hunk":"@@ -21,6 +21,19 @@ def __init__(self, args):\n         :type args: ``list``\n         \"\"\"\n         self.args = args[1:]\n+        self._prepend_venv_path()\n+\n+    @staticmethod\n+    def _prepend_venv_path():\n+        \"\"\"\n+        Modify PATH env variable by prepending virtualenv path with ansible binaries.\n+        This way venv ansible has precedence over globally installed ansible.\n+        \"\"\"\n+        venv_path = '/opt/stackstorm/virtualenvs/ansible/bin'","path":"packs/ansible/actions/lib/ansible_base.py","position":12,"original_position":12,"commit_id":"548d62233a21631393a59d981ee2bc6f79112aa9","original_commit_id":"548d62233a21631393a59d981ee2bc6f79112aa9","user":{"login":"armab","id":1533818,"avatar_url":"https://avatars.githubusercontent.com/u/1533818?v=3","gravatar_id":"","url":"https://api.github.com/users/armab","html_url":"https://github.com/armab","followers_url":"https://api.github.com/users/armab/followers","following_url":"https://api.github.com/users/armab/following{/other_user}","gists_url":"https://api.github.com/users/armab/gists{/gist_id}","starred_url":"https://api.github.com/users/armab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armab/subscriptions","organizations_url":"https://api.github.com/users/armab/orgs","repos_url":"https://api.github.com/users/armab/repos","events_url":"https://api.github.com/users/armab/events{/privacy}","received_events_url":"https://api.github.com/users/armab/received_events","type":"User","site_admin":false},"body":"Yeah np,\r\ndon't like that `/opt/stackstorm/virtualenvs/ansible/bin` too.","created_at":"2015-10-05T17:44:53Z","updated_at":"2015-10-05T17:44:53Z","html_url":"https://github.com/StackStorm/st2contrib/pull/298#discussion_r41173875","pull_request_url":"https://api.github.com/repos/StackStorm/st2contrib/pulls/298","_links":{"self":{"href":"https://api.github.com/repos/StackStorm/st2contrib/pulls/comments/41173875"},"html":{"href":"https://github.com/StackStorm/st2contrib/pull/298#discussion_r41173875"},"pull_request":{"href":"https://api.github.com/repos/StackStorm/st2contrib/pulls/298"}}},"pull_request":{"url":"https://api.github.com/repos/StackStorm/st2contrib/pulls/298","id":46804934,"html_url":"https://github.com/StackStorm/st2contrib/pull/298","diff_url":"https://github.com/StackStorm/st2contrib/pull/298.diff","patch_url":"https://github.com/StackStorm/st2contrib/pull/298.patch","issue_url":"https://api.github.com/repos/StackStorm/st2contrib/issues/298","number":298,"state":"closed","locked":false,"title":"Prepend ansible pack virtualenv path to PATH env variable","user":{"login":"armab","id":1533818,"avatar_url":"https://avatars.githubusercontent.com/u/1533818?v=3","gravatar_id":"","url":"https://api.github.com/users/armab","html_url":"https://github.com/armab","followers_url":"https://api.github.com/users/armab/followers","following_url":"https://api.github.com/users/armab/following{/other_user}","gists_url":"https://api.github.com/users/armab/gists{/gist_id}","starred_url":"https://api.github.com/users/armab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armab/subscriptions","organizations_url":"https://api.github.com/users/armab/orgs","repos_url":"https://api.github.com/users/armab/repos","events_url":"https://api.github.com/users/armab/events{/privacy}","received_events_url":"https://api.github.com/users/armab/received_events","type":"User","site_admin":false},"body":"This way if ansible is not found in st2 pack virtualenv directory, global ansible will be used as a fallback (tested).\r\nFixes #296\r\n","created_at":"2015-10-05T16:47:43Z","updated_at":"2015-10-05T17:44:53Z","closed_at":"2015-10-05T17:03:52Z","merged_at":"2015-10-05T17:03:52Z","merge_commit_sha":"bef5b770f572cc2c99f35b63584a59addfcfc134","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/StackStorm/st2contrib/pulls/298/commits","review_comments_url":"https://api.github.com/repos/StackStorm/st2contrib/pulls/298/comments","review_comment_url":"https://api.github.com/repos/StackStorm/st2contrib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/StackStorm/st2contrib/issues/298/comments","statuses_url":"https://api.github.com/repos/StackStorm/st2contrib/statuses/548d62233a21631393a59d981ee2bc6f79112aa9","head":{"label":"armab:296-fix-ansible-path","ref":"296-fix-ansible-path","sha":"548d62233a21631393a59d981ee2bc6f79112aa9","user":{"login":"armab","id":1533818,"avatar_url":"https://avatars.githubusercontent.com/u/1533818?v=3","gravatar_id":"","url":"https://api.github.com/users/armab","html_url":"https://github.com/armab","followers_url":"https://api.github.com/users/armab/followers","following_url":"https://api.github.com/users/armab/following{/other_user}","gists_url":"https://api.github.com/users/armab/gists{/gist_id}","starred_url":"https://api.github.com/users/armab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armab/subscriptions","organizations_url":"https://api.github.com/users/armab/orgs","repos_url":"https://api.github.com/users/armab/repos","events_url":"https://api.github.com/users/armab/events{/privacy}","received_events_url":"https://api.github.com/users/armab/received_events","type":"User","site_admin":false},"repo":{"id":35368550,"name":"st2contrib","full_name":"armab/st2contrib","owner":{"login":"armab","id":1533818,"avatar_url":"https://avatars.githubusercontent.com/u/1533818?v=3","gravatar_id":"","url":"https://api.github.com/users/armab","html_url":"https://github.com/armab","followers_url":"https://api.github.com/users/armab/followers","following_url":"https://api.github.com/users/armab/following{/other_user}","gists_url":"https://api.github.com/users/armab/gists{/gist_id}","starred_url":"https://api.github.com/users/armab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armab/subscriptions","organizations_url":"https://api.github.com/users/armab/orgs","repos_url":"https://api.github.com/users/armab/repos","events_url":"https://api.github.com/users/armab/events{/privacy}","received_events_url":"https://api.github.com/users/armab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/armab/st2contrib","description":"StackStorm integration packs for many common tools and also helpful tools to build integrations and automations with StackStorm.","fork":true,"url":"https://api.github.com/repos/armab/st2contrib","forks_url":"https://api.github.com/repos/armab/st2contrib/forks","keys_url":"https://api.github.com/repos/armab/st2contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/armab/st2contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/armab/st2contrib/teams","hooks_url":"https://api.github.com/repos/armab/st2contrib/hooks","issue_events_url":"https://api.github.com/repos/armab/st2contrib/issues/events{/number}","events_url":"https://api.github.com/repos/armab/st2contrib/events","assignees_url":"https://api.github.com/repos/armab/st2contrib/assignees{/user}","branches_url":"https://api.github.com/repos/armab/st2contrib/branches{/branch}","tags_url":"https://api.github.com/repos/armab/st2contrib/tags","blobs_url":"https://api.github.com/repos/armab/st2contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/armab/st2contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/armab/st2contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/armab/st2contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/armab/st2contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/armab/st2contrib/languages","stargazers_url":"https://api.github.com/repos/armab/st2contrib/stargazers","contributors_url":"https://api.github.com/repos/armab/st2contrib/contributors","subscribers_url":"https://api.github.com/repos/armab/st2contrib/subscribers","subscription_url":"https://api.github.com/repos/armab/st2contrib/subscription","commits_url":"https://api.github.com/repos/armab/st2contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/armab/st2contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/armab/st2contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/armab/st2contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/armab/st2contrib/contents/{+path}","compare_url":"https://api.github.com/repos/armab/st2contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/armab/st2contrib/merges","archive_url":"https://api.github.com/repos/armab/st2contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/armab/st2contrib/downloads","issues_url":"https://api.github.com/repos/armab/st2contrib/issues{/number}","pulls_url":"https://api.github.com/repos/armab/st2contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/armab/st2contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/armab/st2contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/armab/st2contrib/labels{/name}","releases_url":"https://api.github.com/repos/armab/st2contrib/releases{/id}","created_at":"2015-05-10T11:37:52Z","updated_at":"2015-05-10T11:37:53Z","pushed_at":"2015-10-05T17:04:29Z","git_url":"git://github.com/armab/st2contrib.git","ssh_url":"git@github.com:armab/st2contrib.git","clone_url":"https://github.com/armab/st2contrib.git","svn_url":"https://github.com/armab/st2contrib","homepage":"http://www.stackstorm.com/community","size":3981,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"StackStorm:master","ref":"master","sha":"8179f8c8b084045329ebd2409daa3515dbaaa8b1","user":{"login":"StackStorm","id":4969009,"avatar_url":"https://avatars.githubusercontent.com/u/4969009?v=3","gravatar_id":"","url":"https://api.github.com/users/StackStorm","html_url":"https://github.com/StackStorm","followers_url":"https://api.github.com/users/StackStorm/followers","following_url":"https://api.github.com/users/StackStorm/following{/other_user}","gists_url":"https://api.github.com/users/StackStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/StackStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackStorm/subscriptions","organizations_url":"https://api.github.com/users/StackStorm/orgs","repos_url":"https://api.github.com/users/StackStorm/repos","events_url":"https://api.github.com/users/StackStorm/events{/privacy}","received_events_url":"https://api.github.com/users/StackStorm/received_events","type":"Organization","site_admin":false},"repo":{"id":24968227,"name":"st2contrib","full_name":"StackStorm/st2contrib","owner":{"login":"StackStorm","id":4969009,"avatar_url":"https://avatars.githubusercontent.com/u/4969009?v=3","gravatar_id":"","url":"https://api.github.com/users/StackStorm","html_url":"https://github.com/StackStorm","followers_url":"https://api.github.com/users/StackStorm/followers","following_url":"https://api.github.com/users/StackStorm/following{/other_user}","gists_url":"https://api.github.com/users/StackStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/StackStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackStorm/subscriptions","organizations_url":"https://api.github.com/users/StackStorm/orgs","repos_url":"https://api.github.com/users/StackStorm/repos","events_url":"https://api.github.com/users/StackStorm/events{/privacy}","received_events_url":"https://api.github.com/users/StackStorm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/StackStorm/st2contrib","description":"StackStorm integration packs for many common tools and also helpful tools to build integrations and automations with StackStorm.","fork":false,"url":"https://api.github.com/repos/StackStorm/st2contrib","forks_url":"https://api.github.com/repos/StackStorm/st2contrib/forks","keys_url":"https://api.github.com/repos/StackStorm/st2contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StackStorm/st2contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StackStorm/st2contrib/teams","hooks_url":"https://api.github.com/repos/StackStorm/st2contrib/hooks","issue_events_url":"https://api.github.com/repos/StackStorm/st2contrib/issues/events{/number}","events_url":"https://api.github.com/repos/StackStorm/st2contrib/events","assignees_url":"https://api.github.com/repos/StackStorm/st2contrib/assignees{/user}","branches_url":"https://api.github.com/repos/StackStorm/st2contrib/branches{/branch}","tags_url":"https://api.github.com/repos/StackStorm/st2contrib/tags","blobs_url":"https://api.github.com/repos/StackStorm/st2contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StackStorm/st2contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StackStorm/st2contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/StackStorm/st2contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StackStorm/st2contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/StackStorm/st2contrib/languages","stargazers_url":"https://api.github.com/repos/StackStorm/st2contrib/stargazers","contributors_url":"https://api.github.com/repos/StackStorm/st2contrib/contributors","subscribers_url":"https://api.github.com/repos/StackStorm/st2contrib/subscribers","subscription_url":"https://api.github.com/repos/StackStorm/st2contrib/subscription","commits_url":"https://api.github.com/repos/StackStorm/st2contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/StackStorm/st2contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/StackStorm/st2contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/StackStorm/st2contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/StackStorm/st2contrib/contents/{+path}","compare_url":"https://api.github.com/repos/StackStorm/st2contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StackStorm/st2contrib/merges","archive_url":"https://api.github.com/repos/StackStorm/st2contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StackStorm/st2contrib/downloads","issues_url":"https://api.github.com/repos/StackStorm/st2contrib/issues{/number}","pulls_url":"https://api.github.com/repos/StackStorm/st2contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/StackStorm/st2contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/StackStorm/st2contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StackStorm/st2contrib/labels{/name}","releases_url":"https://api.github.com/repos/StackStorm/st2contrib/releases{/id}","created_at":"2014-10-09T01:19:56Z","updated_at":"2015-10-05T16:23:53Z","pushed_at":"2015-10-05T17:03:52Z","git_url":"git://github.com/StackStorm/st2contrib.git","ssh_url":"git@github.com:StackStorm/st2contrib.git","clone_url":"https://github.com/StackStorm/st2contrib.git","svn_url":"https://github.com/StackStorm/st2contrib","homepage":"http://www.stackstorm.com/community","size":6648,"stargazers_count":38,"watchers_count":38,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":15,"forks":40,"open_issues":15,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/StackStorm/st2contrib/pulls/298"},"html":{"href":"https://github.com/StackStorm/st2contrib/pull/298"},"issue":{"href":"https://api.github.com/repos/StackStorm/st2contrib/issues/298"},"comments":{"href":"https://api.github.com/repos/StackStorm/st2contrib/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/StackStorm/st2contrib/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/StackStorm/st2contrib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/StackStorm/st2contrib/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/StackStorm/st2contrib/statuses/548d62233a21631393a59d981ee2bc6f79112aa9"}}}}