{"action":"created","comment":{"url":"https://api.github.com/repos/edx/configuration/pulls/comments/65527158","id":65527158,"diff_hunk":"@@ -363,53 +349,45 @@\n     - manage\n \n - name: ensure edxapp has started\n-  supervisorctl: >\n-    state=started\n-    supervisorctl_path={{ supervisor_ctl }}\n-    config={{ supervisor_cfg }}\n-    name=\"edxapp:\"\n+  supervisorctl:\n+    name: \"edxapp:\"\n+    supervisorctl_path: \"{{ supervisor_ctl }}\"\n+    config: \"{{ supervisor_cfg }}\"\n+    state: started\n   sudo_user: \"{{ supervisor_service_user }}\"\n   when: celery_worker is not defined and not disable_edx_services\n   tags:\n     - manage\n \n - name: ensure edxapp_workers has started\n-  supervisorctl: >\n-    name=\"edxapp_worker:\"\n-    supervisorctl_path={{ supervisor_ctl }}\n-    config={{ supervisor_cfg }}\n-    state=started\n+  supervisorctl:\n+    name: \"edxapp_worker:\"\n+    supervisorctl_path: \"{{ supervisor_ctl }}\"\n+    config: \"{{ supervisor_cfg }}\"\n+    state: started\n   when: celery_worker is defined and not disable_edx_services\n   sudo_user: \"{{ supervisor_service_user }}\"\n   tags:\n     - manage\n \n-- name: create symlinks from the venv bin dir\n-  file: >\n-    src=\"{{ edxapp_venv_bin }}/{{ item }}\"\n-    dest={{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.edxapp\n-    state=link\n-  with_items:\n-  - python\n-  - pip\n-  - django-admin.py\n-  tags:\n-    - install\n-    - install:configuration\n-\n-- name: create symlinks from the repo dir\n-  file: >\n-    src=\"{{ edxapp_code_dir }}/{{ item }}\"\n-    dest={{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.edxapp\n-    state=link\n+- name: create symlinks from the venv bin dir and repo dir\n+  file:\n+    src: \"{{ item }}\"\n+    dest: \"{{ COMMON_BIN_DIR }}/{{ item.split('.')[0] | basename }}.edxapp\"","path":"playbooks/roles/edxapp/tasks/deploy.yml","position":null,"original_position":345,"commit_id":"a40cb4fcc51d8c11da5da232390f14eafce87d32","original_commit_id":"0c458e4169383a6adfe140adc841f8036986d8a8","user":{"login":"arbabnazar","id":7621775,"avatar_url":"https://avatars.githubusercontent.com/u/7621775?v=3","gravatar_id":"","url":"https://api.github.com/users/arbabnazar","html_url":"https://github.com/arbabnazar","followers_url":"https://api.github.com/users/arbabnazar/followers","following_url":"https://api.github.com/users/arbabnazar/following{/other_user}","gists_url":"https://api.github.com/users/arbabnazar/gists{/gist_id}","starred_url":"https://api.github.com/users/arbabnazar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arbabnazar/subscriptions","organizations_url":"https://api.github.com/users/arbabnazar/orgs","repos_url":"https://api.github.com/users/arbabnazar/repos","events_url":"https://api.github.com/users/arbabnazar/events{/privacy}","received_events_url":"https://api.github.com/users/arbabnazar/received_events","type":"User","site_admin":false},"body":"@smarnach thanks for the example. `rsplit()` works fine if all the `basename` contain `.` but in our case, all the `basename` doesn't contain `.` which mislead to the the wrong value. Here is the full example with the output.\r\n\r\n```yaml\r\n---\r\n- hosts: all\r\n  gather_facts: no\r\n  tasks:\r\n    - debug:\r\n        msg: \"{{ item.rsplit('.', 1) | first | basename }}\"\r\n      with_items:\r\n        - /edx/app/edxapp.test/python\r\n        - /edx/app/edxapp.test/pip\r\n        - /edx/app/edxapp.test/django-admin.py\r\n        - /edx/app/edxapp.test/manage.py'\r\n```\r\nOutput the code is:\r\n```shell\r\n% ansible-playbook -i \"localhost,\" test.yml -c local\r\n\r\nPLAY [all] *********************************************************************\r\n\r\nTASK [debug] *******************************************************************\r\nok: [localhost] => (item=/edx/app/edxapp.test/python) => {\r\n    \"item\": \"/edx/app/edxapp.test/python\",\r\n    \"msg\": \"edxapp\"\r\n}\r\nok: [localhost] => (item=/edx/app/edxapp.test/pip) => {\r\n    \"item\": \"/edx/app/edxapp.test/pip\",\r\n    \"msg\": \"edxapp\"\r\n}\r\nok: [localhost] => (item=/edx/app/edxapp.test/django-admin.py) => {\r\n    \"item\": \"/edx/app/edxapp.test/django-admin.py\",\r\n    \"msg\": \"django-admin\"\r\n}\r\nok: [localhost] => (item=/edx/app/edxapp.test/manage.py') => {\r\n    \"item\": \"/edx/app/edxapp.test/manage.py'\",\r\n    \"msg\": \"manage\"\r\n}\r\n\r\nPLAY RECAP *********************************************************************\r\nlocalhost                  : ok=1    changed=0    unreachable=0    failed=0\r\n```\r\nI think we need to stick with the `split()` because if work for us. \r\n\r\nThanks, ","created_at":"2016-06-02T12:06:59Z","updated_at":"2016-06-02T12:06:59Z","html_url":"https://github.com/edx/configuration/pull/3075#discussion_r65527158","pull_request_url":"https://api.github.com/repos/edx/configuration/pulls/3075","_links":{"self":{"href":"https://api.github.com/repos/edx/configuration/pulls/comments/65527158"},"html":{"href":"https://github.com/edx/configuration/pull/3075#discussion_r65527158"},"pull_request":{"href":"https://api.github.com/repos/edx/configuration/pulls/3075"}}},"pull_request":{"url":"https://api.github.com/repos/edx/configuration/pulls/3075","id":71962315,"html_url":"https://github.com/edx/configuration/pull/3075","diff_url":"https://github.com/edx/configuration/pull/3075.diff","patch_url":"https://github.com/edx/configuration/pull/3075.patch","issue_url":"https://api.github.com/repos/edx/configuration/issues/3075","number":3075,"state":"open","locked":false,"title":"rewrite the edxapp role","user":{"login":"arbabnazar","id":7621775,"avatar_url":"https://avatars.githubusercontent.com/u/7621775?v=3","gravatar_id":"","url":"https://api.github.com/users/arbabnazar","html_url":"https://github.com/arbabnazar","followers_url":"https://api.github.com/users/arbabnazar/followers","following_url":"https://api.github.com/users/arbabnazar/following{/other_user}","gists_url":"https://api.github.com/users/arbabnazar/gists{/gist_id}","starred_url":"https://api.github.com/users/arbabnazar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arbabnazar/subscriptions","organizations_url":"https://api.github.com/users/arbabnazar/orgs","repos_url":"https://api.github.com/users/arbabnazar/repos","events_url":"https://api.github.com/users/arbabnazar/events{/privacy}","received_events_url":"https://api.github.com/users/arbabnazar/received_events","type":"User","site_admin":false},"body":"@edx/devops kindly review. Thanks\r\n\r\nJenkins build to verify this branch (7501)","created_at":"2016-05-31T06:02:46Z","updated_at":"2016-06-02T12:06:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8366fd633d978ab82bf80d3e4a9252f0b9f2d651","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/configuration/pulls/3075/commits","review_comments_url":"https://api.github.com/repos/edx/configuration/pulls/3075/comments","review_comment_url":"https://api.github.com/repos/edx/configuration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/configuration/issues/3075/comments","statuses_url":"https://api.github.com/repos/edx/configuration/statuses/a40cb4fcc51d8c11da5da232390f14eafce87d32","head":{"label":"edx:arbab/edxapp-rewrite","ref":"arbab/edxapp-rewrite","sha":"a40cb4fcc51d8c11da5da232390f14eafce87d32","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":9478219,"name":"configuration","full_name":"edx/configuration","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/configuration","description":"a simple, but flexible, way for anyone to stand up an instance of the edX platform that is fully configured and ready-to-go","fork":false,"url":"https://api.github.com/repos/edx/configuration","forks_url":"https://api.github.com/repos/edx/configuration/forks","keys_url":"https://api.github.com/repos/edx/configuration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/configuration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/configuration/teams","hooks_url":"https://api.github.com/repos/edx/configuration/hooks","issue_events_url":"https://api.github.com/repos/edx/configuration/issues/events{/number}","events_url":"https://api.github.com/repos/edx/configuration/events","assignees_url":"https://api.github.com/repos/edx/configuration/assignees{/user}","branches_url":"https://api.github.com/repos/edx/configuration/branches{/branch}","tags_url":"https://api.github.com/repos/edx/configuration/tags","blobs_url":"https://api.github.com/repos/edx/configuration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/configuration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/configuration/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/configuration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/configuration/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/configuration/languages","stargazers_url":"https://api.github.com/repos/edx/configuration/stargazers","contributors_url":"https://api.github.com/repos/edx/configuration/contributors","subscribers_url":"https://api.github.com/repos/edx/configuration/subscribers","subscription_url":"https://api.github.com/repos/edx/configuration/subscription","commits_url":"https://api.github.com/repos/edx/configuration/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/configuration/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/configuration/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/configuration/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/configuration/contents/{+path}","compare_url":"https://api.github.com/repos/edx/configuration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/configuration/merges","archive_url":"https://api.github.com/repos/edx/configuration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/configuration/downloads","issues_url":"https://api.github.com/repos/edx/configuration/issues{/number}","pulls_url":"https://api.github.com/repos/edx/configuration/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/configuration/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/configuration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/configuration/labels{/name}","releases_url":"https://api.github.com/repos/edx/configuration/releases{/id}","deployments_url":"https://api.github.com/repos/edx/configuration/deployments","created_at":"2013-04-16T17:23:42Z","updated_at":"2016-06-02T11:38:34Z","pushed_at":"2016-06-02T11:08:35Z","git_url":"git://github.com/edx/configuration.git","ssh_url":"git@github.com:edx/configuration.git","clone_url":"https://github.com/edx/configuration.git","svn_url":"https://github.com/edx/configuration","homepage":"","size":41197,"stargazers_count":517,"watchers_count":517,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":503,"mirror_url":null,"open_issues_count":59,"forks":503,"open_issues":59,"watchers":517,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"258045a00dc87d801edb7f2fca68a44f7a354d2e","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":9478219,"name":"configuration","full_name":"edx/configuration","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/configuration","description":"a simple, but flexible, way for anyone to stand up an instance of the edX platform that is fully configured and ready-to-go","fork":false,"url":"https://api.github.com/repos/edx/configuration","forks_url":"https://api.github.com/repos/edx/configuration/forks","keys_url":"https://api.github.com/repos/edx/configuration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/configuration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/configuration/teams","hooks_url":"https://api.github.com/repos/edx/configuration/hooks","issue_events_url":"https://api.github.com/repos/edx/configuration/issues/events{/number}","events_url":"https://api.github.com/repos/edx/configuration/events","assignees_url":"https://api.github.com/repos/edx/configuration/assignees{/user}","branches_url":"https://api.github.com/repos/edx/configuration/branches{/branch}","tags_url":"https://api.github.com/repos/edx/configuration/tags","blobs_url":"https://api.github.com/repos/edx/configuration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/configuration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/configuration/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/configuration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/configuration/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/configuration/languages","stargazers_url":"https://api.github.com/repos/edx/configuration/stargazers","contributors_url":"https://api.github.com/repos/edx/configuration/contributors","subscribers_url":"https://api.github.com/repos/edx/configuration/subscribers","subscription_url":"https://api.github.com/repos/edx/configuration/subscription","commits_url":"https://api.github.com/repos/edx/configuration/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/configuration/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/configuration/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/configuration/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/configuration/contents/{+path}","compare_url":"https://api.github.com/repos/edx/configuration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/configuration/merges","archive_url":"https://api.github.com/repos/edx/configuration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/configuration/downloads","issues_url":"https://api.github.com/repos/edx/configuration/issues{/number}","pulls_url":"https://api.github.com/repos/edx/configuration/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/configuration/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/configuration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/configuration/labels{/name}","releases_url":"https://api.github.com/repos/edx/configuration/releases{/id}","deployments_url":"https://api.github.com/repos/edx/configuration/deployments","created_at":"2013-04-16T17:23:42Z","updated_at":"2016-06-02T11:38:34Z","pushed_at":"2016-06-02T11:08:35Z","git_url":"git://github.com/edx/configuration.git","ssh_url":"git@github.com:edx/configuration.git","clone_url":"https://github.com/edx/configuration.git","svn_url":"https://github.com/edx/configuration","homepage":"","size":41197,"stargazers_count":517,"watchers_count":517,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":503,"mirror_url":null,"open_issues_count":59,"forks":503,"open_issues":59,"watchers":517,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/configuration/pulls/3075"},"html":{"href":"https://github.com/edx/configuration/pull/3075"},"issue":{"href":"https://api.github.com/repos/edx/configuration/issues/3075"},"comments":{"href":"https://api.github.com/repos/edx/configuration/issues/3075/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/configuration/pulls/3075/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/configuration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/configuration/pulls/3075/commits"},"statuses":{"href":"https://api.github.com/repos/edx/configuration/statuses/a40cb4fcc51d8c11da5da232390f14eafce87d32"}}}}
{"actor":{"display_login":"arbabnazar"}}