{"action":"created","comment":{"url":"https://api.github.com/repos/contiv/ansible/pulls/comments/53669034","id":53669034,"diff_hunk":"@@ -40,12 +40,20 @@ start)\n     {% else -%}\n     /usr/bin/docker run --rm -t --name ucp \\\n         -v /var/run/docker.sock:/var/run/docker.sock \\\n-        -e UCP_ADMIN_USER=\"admin\" -e UCP_ADMIN_PASSWORD=\"orca\" \\\n+        -e UCP_ADMIN_USER={{ ucp_admin_user }} -e UCP_ADMIN_PASSWORD={{ ucp_admin_password }} \\\n         docker/ucp join --host-address={{ node_addr }} \\\n           --image-version={{ ucp_version }} \\\n           --url=\"https://{{ service_vip }}:443\" \\\n+    {% if ucp_replicator1_node is defined and node_addr == ucp_replicator1_node_addr -%}","path":"roles/ucp/templates/ucp.j2","position":9,"original_position":9,"commit_id":"db567036fa5416a37cd02291ab5a4d8817f1fcc3","original_commit_id":"db567036fa5416a37cd02291ab5a4d8817f1fcc3","user":{"login":"mapuri","id":9538438,"avatar_url":"https://avatars.githubusercontent.com/u/9538438?v=3","gravatar_id":"","url":"https://api.github.com/users/mapuri","html_url":"https://github.com/mapuri","followers_url":"https://api.github.com/users/mapuri/followers","following_url":"https://api.github.com/users/mapuri/following{/other_user}","gists_url":"https://api.github.com/users/mapuri/gists{/gist_id}","starred_url":"https://api.github.com/users/mapuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapuri/subscriptions","organizations_url":"https://api.github.com/users/mapuri/orgs","repos_url":"https://api.github.com/users/mapuri/repos","events_url":"https://api.github.com/users/mapuri/events{/privacy}","received_events_url":"https://api.github.com/users/mapuri/received_events","type":"User","site_admin":false},"body":"@vvb, I think we can simplify this logic and make it more generic by using the condition `{{ if run_as == master }}` to append the `--replica` flag to this command as only master nodes need to be replicas.\r\n\r\nalso, would you like to make similar change to `roles/swarm/templates/swarm.j2` as well in this PR? Or we can let #88 stay open until swarm is addressed.","created_at":"2016-02-22T18:32:10Z","updated_at":"2016-02-22T18:32:10Z","html_url":"https://github.com/contiv/ansible/pull/93#discussion_r53669034","pull_request_url":"https://api.github.com/repos/contiv/ansible/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/contiv/ansible/pulls/comments/53669034"},"html":{"href":"https://github.com/contiv/ansible/pull/93#discussion_r53669034"},"pull_request":{"href":"https://api.github.com/repos/contiv/ansible/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/contiv/ansible/pulls/93","id":60110034,"html_url":"https://github.com/contiv/ansible/pull/93","diff_url":"https://github.com/contiv/ansible/pull/93.diff","patch_url":"https://github.com/contiv/ansible/pull/93.patch","issue_url":"https://api.github.com/repos/contiv/ansible/issues/93","number":93,"state":"open","locked":false,"title":"ucp fixes; ucp ha support; misc fixes","user":{"login":"vvb","id":4341190,"avatar_url":"https://avatars.githubusercontent.com/u/4341190?v=3","gravatar_id":"","url":"https://api.github.com/users/vvb","html_url":"https://github.com/vvb","followers_url":"https://api.github.com/users/vvb/followers","following_url":"https://api.github.com/users/vvb/following{/other_user}","gists_url":"https://api.github.com/users/vvb/gists{/gist_id}","starred_url":"https://api.github.com/users/vvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvb/subscriptions","organizations_url":"https://api.github.com/users/vvb/orgs","repos_url":"https://api.github.com/users/vvb/repos","events_url":"https://api.github.com/users/vvb/events{/privacy}","received_events_url":"https://api.github.com/users/vvb/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Vikrant Balyan <vijayvikrant84@gmail.com>\r\n\r\n* added `-ctrl-ip {{node_addr}}` to `NETPLUGIN_ARGS` - without it, the netplugin registers with etcd with the localIP instead of the node_addr for non-etcdcluster nodes\r\n* fix for \"wait for ucp files to be created times out.. #81\"\r\n* fix for \"start docker tcp socket service fails on subsequent tries. #86\"\r\n* add `--replica` option to the nodes which do ucp join. Fix for \"ucp/swarm replica needs to be set for HA #88\"\r\n* make sure that docker ucp containers are removed on a `systemctl ucp stop`","created_at":"2016-02-21T23:40:51Z","updated_at":"2016-02-22T18:32:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c87068fad3c4ea82e9c5acc1277c703b6d9543c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/contiv/ansible/pulls/93/commits","review_comments_url":"https://api.github.com/repos/contiv/ansible/pulls/93/comments","review_comment_url":"https://api.github.com/repos/contiv/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/contiv/ansible/issues/93/comments","statuses_url":"https://api.github.com/repos/contiv/ansible/statuses/db567036fa5416a37cd02291ab5a4d8817f1fcc3","head":{"label":"vvb:ucp_fixes","ref":"ucp_fixes","sha":"db567036fa5416a37cd02291ab5a4d8817f1fcc3","user":{"login":"vvb","id":4341190,"avatar_url":"https://avatars.githubusercontent.com/u/4341190?v=3","gravatar_id":"","url":"https://api.github.com/users/vvb","html_url":"https://github.com/vvb","followers_url":"https://api.github.com/users/vvb/followers","following_url":"https://api.github.com/users/vvb/following{/other_user}","gists_url":"https://api.github.com/users/vvb/gists{/gist_id}","starred_url":"https://api.github.com/users/vvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvb/subscriptions","organizations_url":"https://api.github.com/users/vvb/orgs","repos_url":"https://api.github.com/users/vvb/repos","events_url":"https://api.github.com/users/vvb/events{/privacy}","received_events_url":"https://api.github.com/users/vvb/received_events","type":"User","site_admin":false},"repo":{"id":51621962,"name":"ansible","full_name":"vvb/ansible","owner":{"login":"vvb","id":4341190,"avatar_url":"https://avatars.githubusercontent.com/u/4341190?v=3","gravatar_id":"","url":"https://api.github.com/users/vvb","html_url":"https://github.com/vvb","followers_url":"https://api.github.com/users/vvb/followers","following_url":"https://api.github.com/users/vvb/following{/other_user}","gists_url":"https://api.github.com/users/vvb/gists{/gist_id}","starred_url":"https://api.github.com/users/vvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvb/subscriptions","organizations_url":"https://api.github.com/users/vvb/orgs","repos_url":"https://api.github.com/users/vvb/repos","events_url":"https://api.github.com/users/vvb/events{/privacy}","received_events_url":"https://api.github.com/users/vvb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vvb/ansible","description":"ansible scripts for contiv cluster","fork":true,"url":"https://api.github.com/repos/vvb/ansible","forks_url":"https://api.github.com/repos/vvb/ansible/forks","keys_url":"https://api.github.com/repos/vvb/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vvb/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vvb/ansible/teams","hooks_url":"https://api.github.com/repos/vvb/ansible/hooks","issue_events_url":"https://api.github.com/repos/vvb/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/vvb/ansible/events","assignees_url":"https://api.github.com/repos/vvb/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/vvb/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/vvb/ansible/tags","blobs_url":"https://api.github.com/repos/vvb/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vvb/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vvb/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/vvb/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vvb/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/vvb/ansible/languages","stargazers_url":"https://api.github.com/repos/vvb/ansible/stargazers","contributors_url":"https://api.github.com/repos/vvb/ansible/contributors","subscribers_url":"https://api.github.com/repos/vvb/ansible/subscribers","subscription_url":"https://api.github.com/repos/vvb/ansible/subscription","commits_url":"https://api.github.com/repos/vvb/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/vvb/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/vvb/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/vvb/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/vvb/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/vvb/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vvb/ansible/merges","archive_url":"https://api.github.com/repos/vvb/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vvb/ansible/downloads","issues_url":"https://api.github.com/repos/vvb/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/vvb/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/vvb/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/vvb/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vvb/ansible/labels{/name}","releases_url":"https://api.github.com/repos/vvb/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/vvb/ansible/deployments","created_at":"2016-02-12T22:54:49Z","updated_at":"2016-02-12T22:54:51Z","pushed_at":"2016-02-22T18:14:34Z","git_url":"git://github.com/vvb/ansible.git","ssh_url":"git@github.com:vvb/ansible.git","clone_url":"https://github.com/vvb/ansible.git","svn_url":"https://github.com/vvb/ansible","homepage":null,"size":191,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"contiv:master","ref":"master","sha":"b54480fc64aa80c711aa92a04c6eaf41e4ea6360","user":{"login":"contiv","id":10272443,"avatar_url":"https://avatars.githubusercontent.com/u/10272443?v=3","gravatar_id":"","url":"https://api.github.com/users/contiv","html_url":"https://github.com/contiv","followers_url":"https://api.github.com/users/contiv/followers","following_url":"https://api.github.com/users/contiv/following{/other_user}","gists_url":"https://api.github.com/users/contiv/gists{/gist_id}","starred_url":"https://api.github.com/users/contiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contiv/subscriptions","organizations_url":"https://api.github.com/users/contiv/orgs","repos_url":"https://api.github.com/users/contiv/repos","events_url":"https://api.github.com/users/contiv/events{/privacy}","received_events_url":"https://api.github.com/users/contiv/received_events","type":"Organization","site_admin":false},"repo":{"id":46880794,"name":"ansible","full_name":"contiv/ansible","owner":{"login":"contiv","id":10272443,"avatar_url":"https://avatars.githubusercontent.com/u/10272443?v=3","gravatar_id":"","url":"https://api.github.com/users/contiv","html_url":"https://github.com/contiv","followers_url":"https://api.github.com/users/contiv/followers","following_url":"https://api.github.com/users/contiv/following{/other_user}","gists_url":"https://api.github.com/users/contiv/gists{/gist_id}","starred_url":"https://api.github.com/users/contiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contiv/subscriptions","organizations_url":"https://api.github.com/users/contiv/orgs","repos_url":"https://api.github.com/users/contiv/repos","events_url":"https://api.github.com/users/contiv/events{/privacy}","received_events_url":"https://api.github.com/users/contiv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/contiv/ansible","description":"ansible scripts for contiv cluster","fork":false,"url":"https://api.github.com/repos/contiv/ansible","forks_url":"https://api.github.com/repos/contiv/ansible/forks","keys_url":"https://api.github.com/repos/contiv/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/contiv/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/contiv/ansible/teams","hooks_url":"https://api.github.com/repos/contiv/ansible/hooks","issue_events_url":"https://api.github.com/repos/contiv/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/contiv/ansible/events","assignees_url":"https://api.github.com/repos/contiv/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/contiv/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/contiv/ansible/tags","blobs_url":"https://api.github.com/repos/contiv/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/contiv/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/contiv/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/contiv/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/contiv/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/contiv/ansible/languages","stargazers_url":"https://api.github.com/repos/contiv/ansible/stargazers","contributors_url":"https://api.github.com/repos/contiv/ansible/contributors","subscribers_url":"https://api.github.com/repos/contiv/ansible/subscribers","subscription_url":"https://api.github.com/repos/contiv/ansible/subscription","commits_url":"https://api.github.com/repos/contiv/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/contiv/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/contiv/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/contiv/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/contiv/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/contiv/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/contiv/ansible/merges","archive_url":"https://api.github.com/repos/contiv/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/contiv/ansible/downloads","issues_url":"https://api.github.com/repos/contiv/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/contiv/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/contiv/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/contiv/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/contiv/ansible/labels{/name}","releases_url":"https://api.github.com/repos/contiv/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/contiv/ansible/deployments","created_at":"2015-11-25T19:00:58Z","updated_at":"2016-01-11T18:04:18Z","pushed_at":"2016-02-22T18:14:35Z","git_url":"git://github.com/contiv/ansible.git","ssh_url":"git@github.com:contiv/ansible.git","clone_url":"https://github.com/contiv/ansible.git","svn_url":"https://github.com/contiv/ansible","homepage":null,"size":204,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":14,"forks":7,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/contiv/ansible/pulls/93"},"html":{"href":"https://github.com/contiv/ansible/pull/93"},"issue":{"href":"https://api.github.com/repos/contiv/ansible/issues/93"},"comments":{"href":"https://api.github.com/repos/contiv/ansible/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/contiv/ansible/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/contiv/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/contiv/ansible/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/contiv/ansible/statuses/db567036fa5416a37cd02291ab5a4d8817f1fcc3"}}}}