{"action":"opened","number":33989,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/33989","id":158883384,"html_url":"https://github.com/ansible/ansible/pull/33989","diff_url":"https://github.com/ansible/ansible/pull/33989.diff","patch_url":"https://github.com/ansible/ansible/pull/33989.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/33989","number":33989,"state":"open","locked":false,"title":"icinga2_host: Don't set template attribute on modification, it's not permitted","user":{"login":"nerzhul","id":119752,"avatar_url":"https://avatars0.githubusercontent.com/u/119752?v=4","gravatar_id":"","url":"https://api.github.com/users/nerzhul","html_url":"https://github.com/nerzhul","followers_url":"https://api.github.com/users/nerzhul/followers","following_url":"https://api.github.com/users/nerzhul/following{/other_user}","gists_url":"https://api.github.com/users/nerzhul/gists{/gist_id}","starred_url":"https://api.github.com/users/nerzhul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerzhul/subscriptions","organizations_url":"https://api.github.com/users/nerzhul/orgs","repos_url":"https://api.github.com/users/nerzhul/repos","events_url":"https://api.github.com/users/nerzhul/events{/privacy}","received_events_url":"https://api.github.com/users/nerzhul/received_events","type":"User","site_admin":false},"body":"\r\n##### SUMMARY\r\n<!--- Describe the change, including rationale and design decisions -->\r\nIcinga2 API doesn't permit to modify template attribute.\r\nAdded a notice about it in docs and drop template attribute in object dictionnary when modification happens.\r\n\r\n<!---\r\nIf you are fixing an existing issue, please include \"Fixes #nnn\" in your\r\ncommit message and your description; but you should still explain what\r\nthe change does.\r\n-->\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bugfix Pull Request\r\n - Docs Pull Request\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the module, plugin, module or task -->\r\nicinga2_host\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\n2.4.2.0\r\n```\r\n\r\n\r\n##### ADDITIONAL INFORMATION\r\n<!---\r\nInclude additional information to help people understand the change here.\r\nFor bugs that don't have a linked bug report, a step-by-step reproduction\r\nof the problem is helpful.\r\n  -->\r\n\r\nHere is the icinga2 error:\r\n<!--- Paste verbatim command output below, e.g. before and after your change -->\r\n```\r\nfailed: [PRVLINF8004 -> 172.23.15.82] (item=prvlinf8406) => {\r\n    \"changed\": false,\r\n    \"item\": \"server02\",\r\n    \"msg\": {\r\n        \"code\": 200,\r\n        \"data\": {\r\n            \"results\": [\r\n                {\r\n                    \"code\": 500.0,\r\n                    \"name\": \"server02\",\r\n                    \"status\": \"Attribute 'templates' could not be set: Error: Attribute cannot be modified.\r\n\r\n    \\t(0) libbase.so.2.8.0: <unknown function> (+0xf8f37) [0x2b5f7d9b2f37]\r\n    \\t(1) libbase.so.2.8.0: <unknown function> (+0xf8ff7) [0x2b5f7d9b2ff7]\r\n    \\t(2) libbase.so.2.8.0: ********::ConfigObject::ModifyAttribute(********::String const&, ********::Value const&, bool) (+0xe54) [0x2b5f7d97a5a4]\r\n    \\t(3) libremote.so.2.8.0: ********::ModifyObjectHandler::HandleRequest(boost::intrusive_ptr<********::ApiUser> const&, ********::HttpRequest&, ********::HttpResponse&, boost::intrusive_ptr<********::Dictio\r\nnary> const&) (+0x871) [0x2b5f7e25c991]\r\n    \\t(4) libremote.so.2.8.0: ********::HttpHandler::ProcessRequest(boost::intrusive_ptr<********::ApiUser> const&, ********::HttpRequest&, ********::HttpResponse&) (+0x5c2) [0x2b5f7e256082]\r\n    \\t(5) libremote.so.2.8.0: ********::HttpServerConnection::ProcessMessageAsync(********::HttpRequest&) (+0x577) [0x2b5f7e259057]\r\n    \\t(6) libbase.so.2.8.0: ********::WorkQueue::WorkerThreadProc() (+0x4f3) [0x2b5f7d93c163]\r\n    \\t(7) libboost_thread.so.1.55.0: <unknown function> (+0xdaea) [0x2b5f7ccffaea]\r\n    \\t(8) libpthread.so.0: <unknown function> (+0x8064) [0x2b5f7d6a5064]\r\n    \\t(9) libc.so.6: clone (+0x6d) [0x2b5f8011d62d]\r\n\r\n    \",\r\n                    \"type\": \"Host\"\r\n                }\r\n            ]\r\n\r\n```\r\n","created_at":"2017-12-18T10:55:29Z","updated_at":"2017-12-18T10:55:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/33989/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/33989/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/33989/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/003a363ec52b890d5abda7911b943d6011b13076","head":{"label":"nerzhul:icinga2_host_template_bugfix","ref":"icinga2_host_template_bugfix","sha":"003a363ec52b890d5abda7911b943d6011b13076","user":{"login":"nerzhul","id":119752,"avatar_url":"https://avatars0.githubusercontent.com/u/119752?v=4","gravatar_id":"","url":"https://api.github.com/users/nerzhul","html_url":"https://github.com/nerzhul","followers_url":"https://api.github.com/users/nerzhul/followers","following_url":"https://api.github.com/users/nerzhul/following{/other_user}","gists_url":"https://api.github.com/users/nerzhul/gists{/gist_id}","starred_url":"https://api.github.com/users/nerzhul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerzhul/subscriptions","organizations_url":"https://api.github.com/users/nerzhul/orgs","repos_url":"https://api.github.com/users/nerzhul/repos","events_url":"https://api.github.com/users/nerzhul/events{/privacy}","received_events_url":"https://api.github.com/users/nerzhul/received_events","type":"User","site_admin":false},"repo":{"id":66270605,"name":"ansible","full_name":"nerzhul/ansible","owner":{"login":"nerzhul","id":119752,"avatar_url":"https://avatars0.githubusercontent.com/u/119752?v=4","gravatar_id":"","url":"https://api.github.com/users/nerzhul","html_url":"https://github.com/nerzhul","followers_url":"https://api.github.com/users/nerzhul/followers","following_url":"https://api.github.com/users/nerzhul/following{/other_user}","gists_url":"https://api.github.com/users/nerzhul/gists{/gist_id}","starred_url":"https://api.github.com/users/nerzhul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerzhul/subscriptions","organizations_url":"https://api.github.com/users/nerzhul/orgs","repos_url":"https://api.github.com/users/nerzhul/repos","events_url":"https://api.github.com/users/nerzhul/events{/privacy}","received_events_url":"https://api.github.com/users/nerzhul/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nerzhul/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/nerzhul/ansible","forks_url":"https://api.github.com/repos/nerzhul/ansible/forks","keys_url":"https://api.github.com/repos/nerzhul/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nerzhul/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nerzhul/ansible/teams","hooks_url":"https://api.github.com/repos/nerzhul/ansible/hooks","issue_events_url":"https://api.github.com/repos/nerzhul/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/nerzhul/ansible/events","assignees_url":"https://api.github.com/repos/nerzhul/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/nerzhul/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/nerzhul/ansible/tags","blobs_url":"https://api.github.com/repos/nerzhul/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nerzhul/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nerzhul/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/nerzhul/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nerzhul/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/nerzhul/ansible/languages","stargazers_url":"https://api.github.com/repos/nerzhul/ansible/stargazers","contributors_url":"https://api.github.com/repos/nerzhul/ansible/contributors","subscribers_url":"https://api.github.com/repos/nerzhul/ansible/subscribers","subscription_url":"https://api.github.com/repos/nerzhul/ansible/subscription","commits_url":"https://api.github.com/repos/nerzhul/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/nerzhul/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/nerzhul/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/nerzhul/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/nerzhul/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/nerzhul/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nerzhul/ansible/merges","archive_url":"https://api.github.com/repos/nerzhul/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nerzhul/ansible/downloads","issues_url":"https://api.github.com/repos/nerzhul/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/nerzhul/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/nerzhul/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/nerzhul/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nerzhul/ansible/labels{/name}","releases_url":"https://api.github.com/repos/nerzhul/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/nerzhul/ansible/deployments","created_at":"2016-08-22T12:25:17Z","updated_at":"2016-08-22T12:25:26Z","pushed_at":"2017-12-18T10:53:19Z","git_url":"git://github.com/nerzhul/ansible.git","ssh_url":"git@github.com:nerzhul/ansible.git","clone_url":"https://github.com/nerzhul/ansible.git","svn_url":"https://github.com/nerzhul/ansible","homepage":"http://ansible.com/","size":84140,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"a724b8e722d1ae5aa7e23f79311939e45c686220","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","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://avatars2.githubusercontent.com/u/1507452?v=4","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":"2017-12-18T10:42:31Z","pushed_at":"2017-12-18T10:34:13Z","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":"https://www.ansible.com/","size":102096,"stargazers_count":27246,"watchers_count":27246,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9787,"mirror_url":null,"archived":false,"open_issues_count":4540,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":9787,"open_issues":4540,"watchers":27246,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/33989"},"html":{"href":"https://github.com/ansible/ansible/pull/33989"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/33989"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/33989/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/33989/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/33989/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/003a363ec52b890d5abda7911b943d6011b13076"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":6,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"nerzhul"}}