{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/awx/issues/1169","repository_url":"https://api.github.com/repos/ansible/awx","labels_url":"https://api.github.com/repos/ansible/awx/issues/1169/labels{/name}","comments_url":"https://api.github.com/repos/ansible/awx/issues/1169/comments","events_url":"https://api.github.com/repos/ansible/awx/issues/1169/events","html_url":"https://github.com/ansible/awx/issues/1169","id":295633570,"number":1169,"title":"Allow direct job launches from v2 API (/api/v2/jobs/)","user":{"login":"Xiol","id":159842,"avatar_url":"https://avatars0.githubusercontent.com/u/159842?v=4","gravatar_id":"","url":"https://api.github.com/users/Xiol","html_url":"https://github.com/Xiol","followers_url":"https://api.github.com/users/Xiol/followers","following_url":"https://api.github.com/users/Xiol/following{/other_user}","gists_url":"https://api.github.com/users/Xiol/gists{/gist_id}","starred_url":"https://api.github.com/users/Xiol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xiol/subscriptions","organizations_url":"https://api.github.com/users/Xiol/orgs","repos_url":"https://api.github.com/users/Xiol/repos","events_url":"https://api.github.com/users/Xiol/events{/privacy}","received_events_url":"https://api.github.com/users/Xiol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-08T19:18:44Z","updated_at":"2018-02-08T19:18:44Z","closed_at":null,"author_association":"NONE","body":"##### ISSUE TYPE\r\n - Feature Idea\r\n\r\n##### COMPONENT NAME\r\n - API\r\n\r\n##### SUMMARY\r\nf3f10df361884d5060796f467181eeaab0309c51 disabled direct job launching via the v2 API. I'd like to propose this commit is reverted. \r\n\r\nAlthough I guess there was a good reason for disabling this, I've been unable to discover why.\r\n\r\n##### ENVIRONMENT\r\n* AWX version: devel (9bc0a0743b608add7cebfe7c976c666a2788a03d)\r\n* AWX install method: docker on linux\r\n* Ansible version:  2.4.3.0\r\n* Operating System: CentOS 7\r\n* Web Browser: Chrome\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\nPOST a job object to `/api/v2/jobs/`\r\n\r\n```json\r\n{\r\n\t\"name\": \"testrun1__job_080c5a9f-d574-4cce-b46b-1b5351d63722\",\r\n\t\"description\": \"[ED2] Apply roles ([testrole]) and/or playbooks ([]) to 1 hosts\",\r\n\t\"job_type\": \"run\",\r\n\t\"inventory\": 5,\r\n\t\"project\": 6,\r\n\t\"playbook\": \"de51657d-9c58-419e-ac70-bd1f5080e2d4.yml\",\r\n\t\"credential\": 3,\r\n}\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n\r\nThe job runs as desired without the need for a job template.\r\n\r\n##### ACTUAL RESULTS\r\n\r\n405 Method Not Allowed\r\n`{\"error\":\"POST not allowed for Job launching in version 2 of the api\"}`\r\n\r\n##### ADDITIONAL INFORMATION\r\n\r\nAs you may be able to tell from the example POST, we are auto generating these requests to AWX as we're trying to use it to one-shot provision servers which then leave our control (so no need for permanent inventory/playbook configuration). While I could create an ephemeral job template for this I'd rather avoid the extra API call and management overhead.\r\n"}}
{"actor":{"display_login":"Xiol"}}