{"action":"created","comment":{"url":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/comments/51627171","id":51627171,"diff_hunk":"@@ -0,0 +1,55 @@\n+---\n+\n+ - name: Add cartodb postgresql apt repository\n+   apt_repository: repo=ppa:cartodb/postgresql-9.3 update_cache=yes\n+\n+ - name: Install postgresql client packages\n+   apt: name={{ item }} state=present\n+   with_items:\n+    - libpq5\n+    - libpq-dev\n+    - postgresql-client-{{ postgresql_version }}\n+    - postgresql-client-common\n+\n+ - name: Install postgresql server packages\n+   apt: name={{ item }} state=present\n+   with_items:\n+    - postgresql-{{ postgresql_version }}\n+    - postgresql-contrib-{{ postgresql_version }}\n+    - postgresql-server-dev-{{ postgresql_version }}\n+    - postgresql-plpython-{{ postgresql_version }}\n+\n+ - name: Add CartoDB pg-schema-trigger repo\n+   apt_repository: repo=ppa:cartodb/pg-schema-trigger state=present update_cache=yes\n+\n+ - name: Install postgresql schema triggers\n+   apt: name=postgresql-9.3-pg-schema-triggers state=present\n+\n+ - name: Configure PostgreSQL host-based authentication\n+   template: src=pg_hba.conf.j2 dest=/etc/postgresql/{{ postgresql_version }}/main/pg_hba.conf\n+   notify:\n+     - Restart PostgreSQL\n+\n+ - name: Add cartodb publicuser\n+   command: createuser publicuser --no-createrole --no-createdb --no-superuser\n+   sudo: True\n+   sudo_user: postgres\n+   # TODO: Come up with better way to handle user already created","path":"ansible/roles/cartodb.postgresql/tasks/main.yml","position":37,"original_position":37,"commit_id":"bc268f6fa4e1c9bc90c73e8cc4eea1f1bcbb8219","original_commit_id":"bc268f6fa4e1c9bc90c73e8cc4eea1f1bcbb8219","user":{"login":"CloudNiner","id":1818302,"avatar_url":"https://avatars.githubusercontent.com/u/1818302?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudNiner","html_url":"https://github.com/CloudNiner","followers_url":"https://api.github.com/users/CloudNiner/followers","following_url":"https://api.github.com/users/CloudNiner/following{/other_user}","gists_url":"https://api.github.com/users/CloudNiner/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudNiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudNiner/subscriptions","organizations_url":"https://api.github.com/users/CloudNiner/orgs","repos_url":"https://api.github.com/users/CloudNiner/repos","events_url":"https://api.github.com/users/CloudNiner/events{/privacy}","received_events_url":"https://api.github.com/users/CloudNiner/received_events","type":"User","site_admin":false},"body":"Sort of. I punted because the helpful `azavea.postgresql-support` role, which installs the dependencies for that module, has packages that conflict with the cartodb postgresql ppa. I figured it was something we could create an issue for and look at later, since the error message this throws (and skips) when the user already exists is very clear in the ansible log and I had more pressing things to try to figure out as part of this first iteration.","created_at":"2016-02-02T20:09:34Z","updated_at":"2016-02-02T20:09:34Z","html_url":"https://github.com/azavea/ansible-cartodb/pull/1#discussion_r51627171","pull_request_url":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/comments/51627171"},"html":{"href":"https://github.com/azavea/ansible-cartodb/pull/1#discussion_r51627171"},"pull_request":{"href":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/1","id":58036827,"html_url":"https://github.com/azavea/ansible-cartodb/pull/1","diff_url":"https://github.com/azavea/ansible-cartodb/pull/1.diff","patch_url":"https://github.com/azavea/ansible-cartodb/pull/1.patch","issue_url":"https://api.github.com/repos/azavea/ansible-cartodb/issues/1","number":1,"state":"open","locked":false,"title":"Provision an instance of CartoDB on Vagrant","user":{"login":"CloudNiner","id":1818302,"avatar_url":"https://avatars.githubusercontent.com/u/1818302?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudNiner","html_url":"https://github.com/CloudNiner","followers_url":"https://api.github.com/users/CloudNiner/followers","following_url":"https://api.github.com/users/CloudNiner/following{/other_user}","gists_url":"https://api.github.com/users/CloudNiner/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudNiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudNiner/subscriptions","organizations_url":"https://api.github.com/users/CloudNiner/orgs","repos_url":"https://api.github.com/users/CloudNiner/repos","events_url":"https://api.github.com/users/CloudNiner/events{/privacy}","received_events_url":"https://api.github.com/users/CloudNiner/received_events","type":"User","site_admin":false},"body":"Generally follows the install instructions from:\r\nhttp://cartodb.readthedocs.org/en/latest/install.html\r\n\r\nInstructions for use are in README.md","created_at":"2016-02-02T19:27:00Z","updated_at":"2016-02-02T20:09:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e2ffeee22a0e6b58de389de3f111b292df77c5f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/1/commits","review_comments_url":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/1/comments","review_comment_url":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azavea/ansible-cartodb/issues/1/comments","statuses_url":"https://api.github.com/repos/azavea/ansible-cartodb/statuses/bc268f6fa4e1c9bc90c73e8cc4eea1f1bcbb8219","head":{"label":"azavea:feature/initial-provision","ref":"feature/initial-provision","sha":"bc268f6fa4e1c9bc90c73e8cc4eea1f1bcbb8219","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":50854323,"name":"ansible-cartodb","full_name":"azavea/ansible-cartodb","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/ansible-cartodb","description":"Ansible role to build a multi-machine vagrant setup for CartoDB","fork":false,"url":"https://api.github.com/repos/azavea/ansible-cartodb","forks_url":"https://api.github.com/repos/azavea/ansible-cartodb/forks","keys_url":"https://api.github.com/repos/azavea/ansible-cartodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/ansible-cartodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/ansible-cartodb/teams","hooks_url":"https://api.github.com/repos/azavea/ansible-cartodb/hooks","issue_events_url":"https://api.github.com/repos/azavea/ansible-cartodb/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/ansible-cartodb/events","assignees_url":"https://api.github.com/repos/azavea/ansible-cartodb/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/ansible-cartodb/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/ansible-cartodb/tags","blobs_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/ansible-cartodb/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/ansible-cartodb/languages","stargazers_url":"https://api.github.com/repos/azavea/ansible-cartodb/stargazers","contributors_url":"https://api.github.com/repos/azavea/ansible-cartodb/contributors","subscribers_url":"https://api.github.com/repos/azavea/ansible-cartodb/subscribers","subscription_url":"https://api.github.com/repos/azavea/ansible-cartodb/subscription","commits_url":"https://api.github.com/repos/azavea/ansible-cartodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/ansible-cartodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/ansible-cartodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/ansible-cartodb/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/ansible-cartodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/ansible-cartodb/merges","archive_url":"https://api.github.com/repos/azavea/ansible-cartodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/ansible-cartodb/downloads","issues_url":"https://api.github.com/repos/azavea/ansible-cartodb/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/ansible-cartodb/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/ansible-cartodb/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/ansible-cartodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/ansible-cartodb/labels{/name}","releases_url":"https://api.github.com/repos/azavea/ansible-cartodb/releases{/id}","deployments_url":"https://api.github.com/repos/azavea/ansible-cartodb/deployments","created_at":"2016-02-01T16:48:21Z","updated_at":"2016-02-01T16:48:21Z","pushed_at":"2016-02-02T19:42:18Z","git_url":"git://github.com/azavea/ansible-cartodb.git","ssh_url":"git@github.com:azavea/ansible-cartodb.git","clone_url":"https://github.com/azavea/ansible-cartodb.git","svn_url":"https://github.com/azavea/ansible-cartodb","homepage":null,"size":25,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"azavea:develop","ref":"develop","sha":"ba242da4a0e3939b485158c86f3f0b795599bd18","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":50854323,"name":"ansible-cartodb","full_name":"azavea/ansible-cartodb","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/ansible-cartodb","description":"Ansible role to build a multi-machine vagrant setup for CartoDB","fork":false,"url":"https://api.github.com/repos/azavea/ansible-cartodb","forks_url":"https://api.github.com/repos/azavea/ansible-cartodb/forks","keys_url":"https://api.github.com/repos/azavea/ansible-cartodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/ansible-cartodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/ansible-cartodb/teams","hooks_url":"https://api.github.com/repos/azavea/ansible-cartodb/hooks","issue_events_url":"https://api.github.com/repos/azavea/ansible-cartodb/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/ansible-cartodb/events","assignees_url":"https://api.github.com/repos/azavea/ansible-cartodb/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/ansible-cartodb/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/ansible-cartodb/tags","blobs_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/ansible-cartodb/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/ansible-cartodb/languages","stargazers_url":"https://api.github.com/repos/azavea/ansible-cartodb/stargazers","contributors_url":"https://api.github.com/repos/azavea/ansible-cartodb/contributors","subscribers_url":"https://api.github.com/repos/azavea/ansible-cartodb/subscribers","subscription_url":"https://api.github.com/repos/azavea/ansible-cartodb/subscription","commits_url":"https://api.github.com/repos/azavea/ansible-cartodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/ansible-cartodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/ansible-cartodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/ansible-cartodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/ansible-cartodb/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/ansible-cartodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/ansible-cartodb/merges","archive_url":"https://api.github.com/repos/azavea/ansible-cartodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/ansible-cartodb/downloads","issues_url":"https://api.github.com/repos/azavea/ansible-cartodb/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/ansible-cartodb/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/ansible-cartodb/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/ansible-cartodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/ansible-cartodb/labels{/name}","releases_url":"https://api.github.com/repos/azavea/ansible-cartodb/releases{/id}","deployments_url":"https://api.github.com/repos/azavea/ansible-cartodb/deployments","created_at":"2016-02-01T16:48:21Z","updated_at":"2016-02-01T16:48:21Z","pushed_at":"2016-02-02T19:42:18Z","git_url":"git://github.com/azavea/ansible-cartodb.git","ssh_url":"git@github.com:azavea/ansible-cartodb.git","clone_url":"https://github.com/azavea/ansible-cartodb.git","svn_url":"https://github.com/azavea/ansible-cartodb","homepage":null,"size":25,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/1"},"html":{"href":"https://github.com/azavea/ansible-cartodb/pull/1"},"issue":{"href":"https://api.github.com/repos/azavea/ansible-cartodb/issues/1"},"comments":{"href":"https://api.github.com/repos/azavea/ansible-cartodb/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azavea/ansible-cartodb/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/azavea/ansible-cartodb/statuses/bc268f6fa4e1c9bc90c73e8cc4eea1f1bcbb8219"}}}}