{"action":"opened","number":17390,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/17390","id":83940204,"html_url":"https://github.com/ansible/ansible/pull/17390","diff_url":"https://github.com/ansible/ansible/pull/17390.diff","patch_url":"https://github.com/ansible/ansible/pull/17390.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/17390","number":17390,"state":"open","locked":false,"title":"Add public_ip option to linode dynamic inventory","user":{"login":"Jared-Sprague","id":3926730,"avatar_url":"https://avatars.githubusercontent.com/u/3926730?v=3","gravatar_id":"","url":"https://api.github.com/users/Jared-Sprague","html_url":"https://github.com/Jared-Sprague","followers_url":"https://api.github.com/users/Jared-Sprague/followers","following_url":"https://api.github.com/users/Jared-Sprague/following{/other_user}","gists_url":"https://api.github.com/users/Jared-Sprague/gists{/gist_id}","starred_url":"https://api.github.com/users/Jared-Sprague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jared-Sprague/subscriptions","organizations_url":"https://api.github.com/users/Jared-Sprague/orgs","repos_url":"https://api.github.com/users/Jared-Sprague/repos","events_url":"https://api.github.com/users/Jared-Sprague/events{/privacy}","received_events_url":"https://api.github.com/users/Jared-Sprague/received_events","type":"User","site_admin":false},"body":"##### ISSUE TYPE\r\n - Feature Pull Request\r\n\r\n##### COMPONENT NAME\r\nlinode dynamic inventory\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.1.1.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### SUMMARY\r\nCurrently the linode dynamic inventory in contrib/inventory/linode.py assumes that your linode labels match a resolvable hostname.  This patch adds the option to use the linodes public IP instead of the linode label.   This is convenient for linode users who have many linodes that don't have labels set that match hostnames, but public IPs will always be resolvable no matter what the linode label is set to. \r\n\r\nThis patch does not change default behavior but just adds an additional config parameter in linode.ini called `use_public_ip` that is set to false by default.  Setting it to true changes the output to public IP instead of label.  See the below output. \r\n\r\n<!-- Paste verbatim command output below, e.g. before and after your change -->\r\n### Before\r\n```\r\n{\r\n  \"2196623\": [\r\n    \"node-dallas-1\"\r\n  ], \r\n  \"dallas\": [\r\n    \"node-dallas-1\", \r\n  ], \r\n  \"nodes-dallas\": [\r\n    \"node-dallas-1\"\r\n  ]\r\n}\r\n```\r\n\r\n### After with use_public_ip = true\r\n```\r\n{\r\n  \"2196623\": [\r\n    \"45.79.11.206\"\r\n  ], \r\n  \"dallas\": [\r\n    \"45.79.11.206\", \r\n  ], \r\n  \"nodes-dallas\": [\r\n    \"45.79.11.206\"\r\n  ]\r\n}\r\n```\r\n\r\n","created_at":"2016-09-05T01:15:15Z","updated_at":"2016-09-05T01:15:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/17390/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/17390/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/17390/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/14814b9b1d1418e33537b4c7c723862ef346603d","head":{"label":"Jared-Sprague:linode_inventory","ref":"linode_inventory","sha":"14814b9b1d1418e33537b4c7c723862ef346603d","user":{"login":"Jared-Sprague","id":3926730,"avatar_url":"https://avatars.githubusercontent.com/u/3926730?v=3","gravatar_id":"","url":"https://api.github.com/users/Jared-Sprague","html_url":"https://github.com/Jared-Sprague","followers_url":"https://api.github.com/users/Jared-Sprague/followers","following_url":"https://api.github.com/users/Jared-Sprague/following{/other_user}","gists_url":"https://api.github.com/users/Jared-Sprague/gists{/gist_id}","starred_url":"https://api.github.com/users/Jared-Sprague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jared-Sprague/subscriptions","organizations_url":"https://api.github.com/users/Jared-Sprague/orgs","repos_url":"https://api.github.com/users/Jared-Sprague/repos","events_url":"https://api.github.com/users/Jared-Sprague/events{/privacy}","received_events_url":"https://api.github.com/users/Jared-Sprague/received_events","type":"User","site_admin":false},"repo":{"id":67376632,"name":"ansible","full_name":"Jared-Sprague/ansible","owner":{"login":"Jared-Sprague","id":3926730,"avatar_url":"https://avatars.githubusercontent.com/u/3926730?v=3","gravatar_id":"","url":"https://api.github.com/users/Jared-Sprague","html_url":"https://github.com/Jared-Sprague","followers_url":"https://api.github.com/users/Jared-Sprague/followers","following_url":"https://api.github.com/users/Jared-Sprague/following{/other_user}","gists_url":"https://api.github.com/users/Jared-Sprague/gists{/gist_id}","starred_url":"https://api.github.com/users/Jared-Sprague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jared-Sprague/subscriptions","organizations_url":"https://api.github.com/users/Jared-Sprague/orgs","repos_url":"https://api.github.com/users/Jared-Sprague/repos","events_url":"https://api.github.com/users/Jared-Sprague/events{/privacy}","received_events_url":"https://api.github.com/users/Jared-Sprague/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Jared-Sprague/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":true,"url":"https://api.github.com/repos/Jared-Sprague/ansible","forks_url":"https://api.github.com/repos/Jared-Sprague/ansible/forks","keys_url":"https://api.github.com/repos/Jared-Sprague/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Jared-Sprague/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Jared-Sprague/ansible/teams","hooks_url":"https://api.github.com/repos/Jared-Sprague/ansible/hooks","issue_events_url":"https://api.github.com/repos/Jared-Sprague/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/Jared-Sprague/ansible/events","assignees_url":"https://api.github.com/repos/Jared-Sprague/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/Jared-Sprague/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/Jared-Sprague/ansible/tags","blobs_url":"https://api.github.com/repos/Jared-Sprague/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Jared-Sprague/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Jared-Sprague/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/Jared-Sprague/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Jared-Sprague/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/Jared-Sprague/ansible/languages","stargazers_url":"https://api.github.com/repos/Jared-Sprague/ansible/stargazers","contributors_url":"https://api.github.com/repos/Jared-Sprague/ansible/contributors","subscribers_url":"https://api.github.com/repos/Jared-Sprague/ansible/subscribers","subscription_url":"https://api.github.com/repos/Jared-Sprague/ansible/subscription","commits_url":"https://api.github.com/repos/Jared-Sprague/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/Jared-Sprague/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/Jared-Sprague/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/Jared-Sprague/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/Jared-Sprague/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/Jared-Sprague/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Jared-Sprague/ansible/merges","archive_url":"https://api.github.com/repos/Jared-Sprague/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Jared-Sprague/ansible/downloads","issues_url":"https://api.github.com/repos/Jared-Sprague/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/Jared-Sprague/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/Jared-Sprague/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/Jared-Sprague/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Jared-Sprague/ansible/labels{/name}","releases_url":"https://api.github.com/repos/Jared-Sprague/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/Jared-Sprague/ansible/deployments","created_at":"2016-09-05T00:54:30Z","updated_at":"2016-09-05T00:54:39Z","pushed_at":"2016-09-05T01:00:49Z","git_url":"git://github.com/Jared-Sprague/ansible.git","ssh_url":"git@github.com:Jared-Sprague/ansible.git","clone_url":"https://github.com/Jared-Sprague/ansible.git","svn_url":"https://github.com/Jared-Sprague/ansible","homepage":"http://ansible.com/","size":62439,"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":"9c5bcda4fe8beece4d58dcecb3690ee167d3296c","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":3638964,"name":"ansible","full_name":"ansible/ansible","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","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible/deployments","created_at":"2012-03-06T14:58:02Z","updated_at":"2016-09-04T16:53:13Z","pushed_at":"2016-09-05T00:59:20Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"http://ansible.com/","size":62439,"stargazers_count":18633,"watchers_count":18633,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5644,"mirror_url":null,"open_issues_count":1577,"forks":5644,"open_issues":1577,"watchers":18633,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/17390"},"html":{"href":"https://github.com/ansible/ansible/pull/17390"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/17390"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/17390/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/17390/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/17390/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/14814b9b1d1418e33537b4c7c723862ef346603d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":18,"deletions":4,"changed_files":2}}
{"actor":{"display_login":"Jared-Sprague"}}