{"action":"created","comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments/54404708","id":54404708,"diff_hunk":"@@ -0,0 +1,555 @@\n+#!/usr/bin/python\n+# (c) 2015, Ludovic Claude <ludovic.claude@laposte.net>\n+#\n+# This file is part of Ansible\n+#\n+# Ansible is free software: you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation, either version 3 of the License, or\n+# (at your option) any later version.\n+#\n+# Ansible is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with Ansible.  If not, see <http://www.gnu.org/licenses/>.\n+\n+DOCUMENTATION = \"\"\"\n+module: marathon_app\n+version_added: \"2.1\"\n+short_description: start and stop applications with Marathon\n+description:\n+  - Start and stop applications with Marathon.\n+author: \"Ludovic Claude (@ludovicc)\"\n+\n+options:\n+  uri:\n+    required: true\n+    description:\n+      - Base URI for the Marathon instance\n+\n+  state:\n+    required: true\n+    choices: [ present, absent, restart, kill ]\n+    default: \"present\"\n+    description:\n+      - The operation to perform.\n+\n+  username:\n+    required: false\n+    description:\n+      - The username to log-in with.\n+\n+  password:\n+    required: false\n+    description:\n+      - The password to log-in with.\n+\n+  id:\n+    required: true\n+    description:\n+      - Unique identifier for the app consisting of a series of names separated by slashes.\n+\n+  command:\n+    aliases: [ cmd ]\n+    required: false\n+    description:\n+      - The command that is executed.\n+\n+  arguments:\n+    aliases: [ args ]\n+    required: false\n+    description:\n+      - An array of strings that represents an alternative mode of specifying the command to run.\n+\n+  cpus:\n+    required: false\n+    description:\n+     - The number of CPU`s this application needs per instance. This number does not have to be integer, but can be a fraction.\n+\n+  memory:\n+    aliases: [ mem ]\n+    required: false\n+    description:\n+     - The amount of memory in MB that is needed for the application per instance.\n+\n+  disk:\n+    required: false\n+    description:\n+     - The amount of disk in MB that is reserved for the application per instance.\n+\n+  ports:\n+    required: false\n+    description:\n+     - An array of required port resources on the host.\n+\n+  requirePorts:\n+    required: false\n+    description:\n+     - If true, the ports you have specified are used as host ports.\n+\n+  instances:\n+    required: false\n+    description:\n+     - The number of instances of this application to start.\n+\n+  executor:\n+    required: false\n+    description:\n+     - The executor to use to launch this application.\n+\n+  user:\n+    required: false\n+    description:\n+      - The user to use to launch this application.\n+\n+  container:\n+    required: false\n+    description:\n+     - Additional data passed to the containerizer on application launch. This is a free-form data structure that can contain arbitrary data.\n+\n+  docker_image:\n+    required: false\n+    description:\n+     - Name of the Docker image. Ignored if container is defined.\n+\n+  docker_forcePullImage:\n+    required: false\n+    description:\n+     - Force Docker to pull the image before launching each task. Ignored if container is defined.\n+\n+  docker_privileged:\n+    required: false\n+    description:\n+     - Allows users to run containers in privileged mode. Ignored if container is defined.\n+\n+  docker_network:\n+    required: false\n+    description:\n+     - Type of networking for the Docker container. Ignored if container is defined.\n+\n+  docker_portMappings:\n+    required: false\n+    description:\n+     - Port mappings for the Docker container. Ignored if container is defined.\n+\n+  docker_parameters:\n+    required: false\n+    description:\n+     - Arbitrary parameters for the Docker container. Ignored if container is defined.\n+\n+  container_volumes:\n+    required: false\n+    description:\n+     - Array of volumes for the container. Ignored if container is defined.\n+\n+  env:\n+    required: false","path":"clustering/marathon.py","position":149,"original_position":149,"commit_id":"6e68eebc9874ba0528dab6a8fbf491a3f5555339","original_commit_id":"6e68eebc9874ba0528dab6a8fbf491a3f5555339","user":{"login":"resmo","id":23809,"avatar_url":"https://avatars.githubusercontent.com/u/23809?v=3","gravatar_id":"","url":"https://api.github.com/users/resmo","html_url":"https://github.com/resmo","followers_url":"https://api.github.com/users/resmo/followers","following_url":"https://api.github.com/users/resmo/following{/other_user}","gists_url":"https://api.github.com/users/resmo/gists{/gist_id}","starred_url":"https://api.github.com/users/resmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resmo/subscriptions","organizations_url":"https://api.github.com/users/resmo/orgs","repos_url":"https://api.github.com/users/resmo/repos","events_url":"https://api.github.com/users/resmo/events{/privacy}","received_events_url":"https://api.github.com/users/resmo/received_events","type":"User","site_admin":false},"body":"if required: false is defined you must define a default e.g. default: null also see http://docs.ansible.com/ansible/developing_modules.html#module-checklist","created_at":"2016-02-29T12:44:28Z","updated_at":"2016-02-29T12:44:28Z","html_url":"https://github.com/ansible/ansible-modules-extras/pull/1258#discussion_r54404708","pull_request_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1258","_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments/54404708"},"html":{"href":"https://github.com/ansible/ansible-modules-extras/pull/1258#discussion_r54404708"},"pull_request":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1258"}}},"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1258","id":51023272,"html_url":"https://github.com/ansible/ansible-modules-extras/pull/1258","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/1258.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/1258.patch","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1258","number":1258,"state":"open","locked":false,"title":"Add marathon module","user":{"login":"ludovicc","id":104937,"avatar_url":"https://avatars.githubusercontent.com/u/104937?v=3","gravatar_id":"","url":"https://api.github.com/users/ludovicc","html_url":"https://github.com/ludovicc","followers_url":"https://api.github.com/users/ludovicc/followers","following_url":"https://api.github.com/users/ludovicc/following{/other_user}","gists_url":"https://api.github.com/users/ludovicc/gists{/gist_id}","starred_url":"https://api.github.com/users/ludovicc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ludovicc/subscriptions","organizations_url":"https://api.github.com/users/ludovicc/orgs","repos_url":"https://api.github.com/users/ludovicc/repos","events_url":"https://api.github.com/users/ludovicc/events{/privacy}","received_events_url":"https://api.github.com/users/ludovicc/received_events","type":"User","site_admin":false},"body":"This module controls applications managed by Marathon on a Mesos cluster.\r\n\r\nStarting and stopping applications works well, applications in Docker containers are supported.\r\nSecurity features of Marathon are not yet supported (SSL, authentication).","created_at":"2015-11-17T23:53:12Z","updated_at":"2016-02-29T12:44:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54052b7615c8544ad83cac273a994b60f193df0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1258/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1258/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1258/comments","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/6e68eebc9874ba0528dab6a8fbf491a3f5555339","head":{"label":"ludovicc:devel","ref":"devel","sha":"6e68eebc9874ba0528dab6a8fbf491a3f5555339","user":{"login":"ludovicc","id":104937,"avatar_url":"https://avatars.githubusercontent.com/u/104937?v=3","gravatar_id":"","url":"https://api.github.com/users/ludovicc","html_url":"https://github.com/ludovicc","followers_url":"https://api.github.com/users/ludovicc/followers","following_url":"https://api.github.com/users/ludovicc/following{/other_user}","gists_url":"https://api.github.com/users/ludovicc/gists{/gist_id}","starred_url":"https://api.github.com/users/ludovicc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ludovicc/subscriptions","organizations_url":"https://api.github.com/users/ludovicc/orgs","repos_url":"https://api.github.com/users/ludovicc/repos","events_url":"https://api.github.com/users/ludovicc/events{/privacy}","received_events_url":"https://api.github.com/users/ludovicc/received_events","type":"User","site_admin":false},"repo":{"id":46382821,"name":"ansible-modules-extras","full_name":"ludovicc/ansible-modules-extras","owner":{"login":"ludovicc","id":104937,"avatar_url":"https://avatars.githubusercontent.com/u/104937?v=3","gravatar_id":"","url":"https://api.github.com/users/ludovicc","html_url":"https://github.com/ludovicc","followers_url":"https://api.github.com/users/ludovicc/followers","following_url":"https://api.github.com/users/ludovicc/following{/other_user}","gists_url":"https://api.github.com/users/ludovicc/gists{/gist_id}","starred_url":"https://api.github.com/users/ludovicc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ludovicc/subscriptions","organizations_url":"https://api.github.com/users/ludovicc/orgs","repos_url":"https://api.github.com/users/ludovicc/repos","events_url":"https://api.github.com/users/ludovicc/events{/privacy}","received_events_url":"https://api.github.com/users/ludovicc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ludovicc/ansible-modules-extras","description":"Ansible extra modules - these modules ship with ansible","fork":true,"url":"https://api.github.com/repos/ludovicc/ansible-modules-extras","forks_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/forks","keys_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/teams","hooks_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/hooks","issue_events_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/issues/events{/number}","events_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/events","assignees_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/assignees{/user}","branches_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/branches{/branch}","tags_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/tags","blobs_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/languages","stargazers_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/stargazers","contributors_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/contributors","subscribers_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/subscribers","subscription_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/subscription","commits_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/contents/{+path}","compare_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/merges","archive_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/downloads","issues_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/issues{/number}","pulls_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/labels{/name}","releases_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/releases{/id}","deployments_url":"https://api.github.com/repos/ludovicc/ansible-modules-extras/deployments","created_at":"2015-11-17T23:45:15Z","updated_at":"2016-02-17T19:39:37Z","pushed_at":"2016-02-29T11:30:27Z","git_url":"git://github.com/ludovicc/ansible-modules-extras.git","ssh_url":"git@github.com:ludovicc/ansible-modules-extras.git","clone_url":"https://github.com/ludovicc/ansible-modules-extras.git","svn_url":"https://github.com/ludovicc/ansible-modules-extras","homepage":"","size":6046,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"7da1f8d4ca3ab8b00e0b3a056d8ba03a4d2bf3a4","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":24474138,"name":"ansible-modules-extras","full_name":"ansible/ansible-modules-extras","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible-modules-extras","description":"Ansible extra modules - these modules ship with ansible","fork":false,"url":"https://api.github.com/repos/ansible/ansible-modules-extras","forks_url":"https://api.github.com/repos/ansible/ansible-modules-extras/forks","keys_url":"https://api.github.com/repos/ansible/ansible-modules-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible-modules-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible-modules-extras/teams","hooks_url":"https://api.github.com/repos/ansible/ansible-modules-extras/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/events","assignees_url":"https://api.github.com/repos/ansible/ansible-modules-extras/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible-modules-extras/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible-modules-extras/tags","blobs_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible-modules-extras/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible-modules-extras/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible-modules-extras/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible-modules-extras/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible-modules-extras/subscription","commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible-modules-extras/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible-modules-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible-modules-extras/merges","archive_url":"https://api.github.com/repos/ansible/ansible-modules-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible-modules-extras/downloads","issues_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible-modules-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible-modules-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible-modules-extras/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/deployments","created_at":"2014-09-25T20:28:42Z","updated_at":"2016-02-29T10:50:31Z","pushed_at":"2016-02-29T12:12:26Z","git_url":"git://github.com/ansible/ansible-modules-extras.git","ssh_url":"git@github.com:ansible/ansible-modules-extras.git","clone_url":"https://github.com/ansible/ansible-modules-extras.git","svn_url":"https://github.com/ansible/ansible-modules-extras","homepage":"","size":12310,"stargazers_count":491,"watchers_count":491,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":996,"mirror_url":null,"open_issues_count":543,"forks":996,"open_issues":543,"watchers":491,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1258"},"html":{"href":"https://github.com/ansible/ansible-modules-extras/pull/1258"},"issue":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1258"},"comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1258/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1258/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1258/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/6e68eebc9874ba0528dab6a8fbf491a3f5555339"}}}}