{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/openshift-ansible/issues/1705","repository_url":"https://api.github.com/repos/openshift/openshift-ansible","labels_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/1705/labels{/name}","comments_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/1705/comments","events_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/1705/events","html_url":"https://github.com/openshift/openshift-ansible/pull/1705","id":145791503,"number":1705,"title":"Add support for creating secure router","user":{"login":"abutcher","id":47003,"avatar_url":"https://avatars.githubusercontent.com/u/47003?v=3","gravatar_id":"","url":"https://api.github.com/users/abutcher","html_url":"https://github.com/abutcher","followers_url":"https://api.github.com/users/abutcher/followers","following_url":"https://api.github.com/users/abutcher/following{/other_user}","gists_url":"https://api.github.com/users/abutcher/gists{/gist_id}","starred_url":"https://api.github.com/users/abutcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abutcher/subscriptions","organizations_url":"https://api.github.com/users/abutcher/orgs","repos_url":"https://api.github.com/users/abutcher/repos","events_url":"https://api.github.com/users/abutcher/events{/privacy}","received_events_url":"https://api.github.com/users/abutcher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-04T20:14:10Z","updated_at":"2016-04-11T18:45:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openshift/openshift-ansible/pulls/1705","html_url":"https://github.com/openshift/openshift-ansible/pull/1705","diff_url":"https://github.com/openshift/openshift-ansible/pull/1705.diff","patch_url":"https://github.com/openshift/openshift-ansible/pull/1705.patch"},"body":"* Adds option for specifying an `openshift_hosted_router_certificate` cert and key pair.\r\n* Removes dependency on node label variables and retrieves the node list from the API s.t. this role can be applied to any cluster with existing nodes. I've added an openshift_hosted playbook that occurs after node install to account for this.\r\n* Infrastructure nodes are selected using `openshift_hosted_router_selector` which is based on deployment type by default; openshift-enterprise -> \"region=infra\" and online -> \"type=infra\".\r\n\r\nInventory options\r\n```\r\n# OpenShift Router Options\r\n# \r\n# An OpenShift router will be created during install if there are\r\n# nodes present with labels matching the default router selector,\r\n# \"region=infra\". Set openshift_node_labels per node as needed in\r\n# order to label nodes.\r\n# \r\n# Example:\r\n# [nodes]\r\n# node.example.com openshift_node_labels=\"{'region': 'infra'}\"\r\n# \r\n# Router selector (optional)\r\n# Router will only be created if nodes matching this label are present.\r\n# Default value: 'region=infra'\r\n#openshift_hosted_router_selector='region=infra'\r\n# \r\n# Router replicas (optional)\r\n# Unless specified, openshift-ansible will calculate the replica count\r\n# based on the number of nodes matching the openshift router selector.\r\n#openshift_hosted_router_replicas=2\r\n#\r\n# Router certificate (optional)\r\n# Provide local certificate paths which will be configured as the\r\n# router's default certificate.\r\n#openshift_hosted_router_certificate={\"certfile\": \"/path/to/router.crt\", \"keyfile\": \"/path/to/router.key\"}\r\n```\r\n\r\nExample playbook\r\n```\r\n- name: Create hosted resources\r\n  hosts: oo_first_master\r\n  roles:\r\n  - role: openshift_hosted\r\n    openshift_hosted_router_certificate:\r\n      certfile: /path/to/my-router.crt\r\n      keyfile: /path/to/my-router.key\r\n    openshift_hosted_router_registryurl: 'registry.access.redhat.com/openshift3/ose-haproxy-router:v3.0.2.0'\r\n    openshift_hosted_router_selector: 'type=infra'\r\n```\r\n\r\n@dak1n1 @detiber ptal\r\n"},"comment":{"url":"https://api.github.com/repos/openshift/openshift-ansible/issues/comments/208493755","html_url":"https://github.com/openshift/openshift-ansible/pull/1705#issuecomment-208493755","issue_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/1705","id":208493755,"user":{"login":"abutcher","id":47003,"avatar_url":"https://avatars.githubusercontent.com/u/47003?v=3","gravatar_id":"","url":"https://api.github.com/users/abutcher","html_url":"https://github.com/abutcher","followers_url":"https://api.github.com/users/abutcher/followers","following_url":"https://api.github.com/users/abutcher/following{/other_user}","gists_url":"https://api.github.com/users/abutcher/gists{/gist_id}","starred_url":"https://api.github.com/users/abutcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abutcher/subscriptions","organizations_url":"https://api.github.com/users/abutcher/orgs","repos_url":"https://api.github.com/users/abutcher/repos","events_url":"https://api.github.com/users/abutcher/events{/privacy}","received_events_url":"https://api.github.com/users/abutcher/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T18:45:10Z","updated_at":"2016-04-11T18:45:10Z","body":"aos-ci-test"}}