{"action":"created","issue":{"url":"https://api.github.com/repos/theforeman/community-templates/issues/357","repository_url":"https://api.github.com/repos/theforeman/community-templates","labels_url":"https://api.github.com/repos/theforeman/community-templates/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/theforeman/community-templates/issues/357/comments","events_url":"https://api.github.com/repos/theforeman/community-templates/issues/357/events","html_url":"https://github.com/theforeman/community-templates/issues/357","id":206179496,"number":357,"title":"Add ZONE to a subnet","user":{"login":"jovandeginste","id":3170771,"avatar_url":"https://avatars0.githubusercontent.com/u/3170771?v=3","gravatar_id":"","url":"https://api.github.com/users/jovandeginste","html_url":"https://github.com/jovandeginste","followers_url":"https://api.github.com/users/jovandeginste/followers","following_url":"https://api.github.com/users/jovandeginste/following{/other_user}","gists_url":"https://api.github.com/users/jovandeginste/gists{/gist_id}","starred_url":"https://api.github.com/users/jovandeginste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jovandeginste/subscriptions","organizations_url":"https://api.github.com/users/jovandeginste/orgs","repos_url":"https://api.github.com/users/jovandeginste/repos","events_url":"https://api.github.com/users/jovandeginste/events{/privacy}","received_events_url":"https://api.github.com/users/jovandeginste/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-08T12:05:20Z","updated_at":"2017-03-17T09:16:47Z","closed_at":null,"body":"With `firewalld`, interfaces can be added to zones (eg. public, mgmt, private, docker, ...).\r\n\r\nI assign zones to subnets (public vs private), and add ZONE=$the_zone to the network device configuration file (eg. `/etc/sysconfig/network-scripts/ifcfg-eth0`)\r\n\r\nThis means I don't need to tell firewalld separately about the mapping of interfaces to zones, it is automatically added by `ifup`.\r\n\r\nThe question is: should this ZONE parameter be a \"native\" field in the subnet editor, or should it be added as a custom parameter (in the \"Parameters\" tab)?\r\n\r\nThe second means no code changes at all; the first means we can use this in the installation templates..."},"comment":{"url":"https://api.github.com/repos/theforeman/community-templates/issues/comments/287304483","html_url":"https://github.com/theforeman/community-templates/issues/357#issuecomment-287304483","issue_url":"https://api.github.com/repos/theforeman/community-templates/issues/357","id":287304483,"user":{"login":"ares","id":109773,"avatar_url":"https://avatars3.githubusercontent.com/u/109773?v=3","gravatar_id":"","url":"https://api.github.com/users/ares","html_url":"https://github.com/ares","followers_url":"https://api.github.com/users/ares/followers","following_url":"https://api.github.com/users/ares/following{/other_user}","gists_url":"https://api.github.com/users/ares/gists{/gist_id}","starred_url":"https://api.github.com/users/ares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ares/subscriptions","organizations_url":"https://api.github.com/users/ares/orgs","repos_url":"https://api.github.com/users/ares/repos","events_url":"https://api.github.com/users/ares/events{/privacy}","received_events_url":"https://api.github.com/users/ares/received_events","type":"User","site_admin":false},"created_at":"2017-03-17T09:16:47Z","updated_at":"2017-03-17T09:16:47Z","body":"Normally we don't access parameters on specific subnet/domain/os etc but we check host parameters which contains parameters defined on these objects. You could do something like\r\n\r\n```\r\n<% zone = @host.params['firewall_zone'] || \"public\" %>\r\nfirewalld --zone <%= zone -%>\r\n```\r\n\r\neven if the parameter would be defined on host's subnet, it would be available in @host.params"}}
{"actor":{"display_login":"ares"}}