{"action":"created","comment":{"url":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/comments/77823655","id":77823655,"diff_hunk":"@@ -0,0 +1,93 @@\n+# file: postgresql/tasks/databases-docker.yml\n+\n+- name: PostgreSQL | Make sure the PostgreSQL databases are present\n+  postgresql_db:\n+    name: \"{{item.name}}\"\n+    owner: \"{{ item.owner | default(postgresql_database_owner) }}\"\n+    encoding: \"{{ item.encoding | default(postgresql_encoding) }}\"\n+    lc_collate: \"{{ item.lc_collate | default(postgresql_locale) }}\"\n+    lc_ctype: \"{{ item.lc_ctype | default(postgresql_ctype) }}\"\n+    port: \"{{postgresql_port}}\"\n+    template: \"template0\"\n+    state: present\n+    login_user: \"{{postgresql_admin_user}}\"\n+    login_password: \"{{postgresql_admin_pwd}}\"\n+    login_host: \"{{postgresql_login_host}}\"\n+  with_items: \"{{postgresql_databases}}\"\n+  when: postgresql_databases|length > 0\n+\n+- name: PostgreSQL | Add extensions to the databases\n+  shell: \"psql {{item.0.db}} --username {{postgresql_admin_user}} --host {{postgresql_login_host}} --port {{postgresql_port}} -c 'CREATE EXTENSION IF NOT EXISTS {{ item.1 }};'\"\n+  become: yes\n+  with_subelements:\n+    - \"{{postgresql_database_extensions}}\"\n+    - extensions\n+  register: result\n+  changed_when: \"'NOTICE' not in result.stderr\"\n+  environment:\n+    PGPASSWORD: \"{{postgresql_admin_pwd}}\"\n+\n+- name: PostgreSQL | Add hstore to the databases with the requirement\n+  become: yes\n+  shell: \"{{ postgresql_bin_directory}}/psql {{item.name}} --username {{postgresql_admin_user}} --host {{postgresql_login_host}} --port {{postgresql_port}} -c 'CREATE EXTENSION IF NOT EXISTS hstore;'\"","path":"tasks/databases-docker.yml","position":32,"original_position":32,"commit_id":"231ed07985c2aea2b179d63545a06331206698fa","original_commit_id":"231ed07985c2aea2b179d63545a06331206698fa","user":{"login":"lhoss","id":3091244,"avatar_url":"https://avatars.githubusercontent.com/u/3091244?v=3","gravatar_id":"","url":"https://api.github.com/users/lhoss","html_url":"https://github.com/lhoss","followers_url":"https://api.github.com/users/lhoss/followers","following_url":"https://api.github.com/users/lhoss/following{/other_user}","gists_url":"https://api.github.com/users/lhoss/gists{/gist_id}","starred_url":"https://api.github.com/users/lhoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhoss/subscriptions","organizations_url":"https://api.github.com/users/lhoss/orgs","repos_url":"https://api.github.com/users/lhoss/repos","events_url":"https://api.github.com/users/lhoss/events{/privacy}","received_events_url":"https://api.github.com/users/lhoss/received_events","type":"User","site_admin":false},"body":"what about `postgresql_bin_directory` being different on the docker-host  (than the default, as configured for the container ?)\r\n\r\nMaybe you need to add some more 'Docker mode requirements' to get it working, like that the docker-host should have `psql`client setup , like you need to set the `postgresql_admin_pwd`","created_at":"2016-09-07T13:42:08Z","updated_at":"2016-09-07T13:42:08Z","html_url":"https://github.com/teralytics/ansible-postgresql/pull/2#discussion_r77823655","pull_request_url":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/comments/77823655"},"html":{"href":"https://github.com/teralytics/ansible-postgresql/pull/2#discussion_r77823655"},"pull_request":{"href":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/2","id":84017029,"html_url":"https://github.com/teralytics/ansible-postgresql/pull/2","diff_url":"https://github.com/teralytics/ansible-postgresql/pull/2.diff","patch_url":"https://github.com/teralytics/ansible-postgresql/pull/2.patch","issue_url":"https://api.github.com/repos/teralytics/ansible-postgresql/issues/2","number":2,"state":"open","locked":false,"title":"Changes to support docker deployments","user":{"login":"vincepii","id":159605,"avatar_url":"https://avatars.githubusercontent.com/u/159605?v=3","gravatar_id":"","url":"https://api.github.com/users/vincepii","html_url":"https://github.com/vincepii","followers_url":"https://api.github.com/users/vincepii/followers","following_url":"https://api.github.com/users/vincepii/following{/other_user}","gists_url":"https://api.github.com/users/vincepii/gists{/gist_id}","starred_url":"https://api.github.com/users/vincepii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincepii/subscriptions","organizations_url":"https://api.github.com/users/vincepii/orgs","repos_url":"https://api.github.com/users/vincepii/repos","events_url":"https://api.github.com/users/vincepii/events{/privacy}","received_events_url":"https://api.github.com/users/vincepii/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-05T15:23:57Z","updated_at":"2016-09-07T13:42:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f9bbf2a6cc06c16e6e533a1f99e67b56c49c24e","assignee":{"login":"lhoss","id":3091244,"avatar_url":"https://avatars.githubusercontent.com/u/3091244?v=3","gravatar_id":"","url":"https://api.github.com/users/lhoss","html_url":"https://github.com/lhoss","followers_url":"https://api.github.com/users/lhoss/followers","following_url":"https://api.github.com/users/lhoss/following{/other_user}","gists_url":"https://api.github.com/users/lhoss/gists{/gist_id}","starred_url":"https://api.github.com/users/lhoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhoss/subscriptions","organizations_url":"https://api.github.com/users/lhoss/orgs","repos_url":"https://api.github.com/users/lhoss/repos","events_url":"https://api.github.com/users/lhoss/events{/privacy}","received_events_url":"https://api.github.com/users/lhoss/received_events","type":"User","site_admin":false},"assignees":[{"login":"lhoss","id":3091244,"avatar_url":"https://avatars.githubusercontent.com/u/3091244?v=3","gravatar_id":"","url":"https://api.github.com/users/lhoss","html_url":"https://github.com/lhoss","followers_url":"https://api.github.com/users/lhoss/followers","following_url":"https://api.github.com/users/lhoss/following{/other_user}","gists_url":"https://api.github.com/users/lhoss/gists{/gist_id}","starred_url":"https://api.github.com/users/lhoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhoss/subscriptions","organizations_url":"https://api.github.com/users/lhoss/orgs","repos_url":"https://api.github.com/users/lhoss/repos","events_url":"https://api.github.com/users/lhoss/events{/privacy}","received_events_url":"https://api.github.com/users/lhoss/received_events","type":"User","site_admin":false},{"login":"tsaridas","id":6619221,"avatar_url":"https://avatars.githubusercontent.com/u/6619221?v=3","gravatar_id":"","url":"https://api.github.com/users/tsaridas","html_url":"https://github.com/tsaridas","followers_url":"https://api.github.com/users/tsaridas/followers","following_url":"https://api.github.com/users/tsaridas/following{/other_user}","gists_url":"https://api.github.com/users/tsaridas/gists{/gist_id}","starred_url":"https://api.github.com/users/tsaridas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsaridas/subscriptions","organizations_url":"https://api.github.com/users/tsaridas/orgs","repos_url":"https://api.github.com/users/tsaridas/repos","events_url":"https://api.github.com/users/tsaridas/events{/privacy}","received_events_url":"https://api.github.com/users/tsaridas/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/2/commits","review_comments_url":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/2/comments","review_comment_url":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/teralytics/ansible-postgresql/issues/2/comments","statuses_url":"https://api.github.com/repos/teralytics/ansible-postgresql/statuses/231ed07985c2aea2b179d63545a06331206698fa","head":{"label":"teralytics:support-postgres-in-docker","ref":"support-postgres-in-docker","sha":"231ed07985c2aea2b179d63545a06331206698fa","user":{"login":"teralytics","id":3001648,"avatar_url":"https://avatars.githubusercontent.com/u/3001648?v=3","gravatar_id":"","url":"https://api.github.com/users/teralytics","html_url":"https://github.com/teralytics","followers_url":"https://api.github.com/users/teralytics/followers","following_url":"https://api.github.com/users/teralytics/following{/other_user}","gists_url":"https://api.github.com/users/teralytics/gists{/gist_id}","starred_url":"https://api.github.com/users/teralytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teralytics/subscriptions","organizations_url":"https://api.github.com/users/teralytics/orgs","repos_url":"https://api.github.com/users/teralytics/repos","events_url":"https://api.github.com/users/teralytics/events{/privacy}","received_events_url":"https://api.github.com/users/teralytics/received_events","type":"Organization","site_admin":false},"repo":{"id":55230187,"name":"ansible-postgresql","full_name":"teralytics/ansible-postgresql","owner":{"login":"teralytics","id":3001648,"avatar_url":"https://avatars.githubusercontent.com/u/3001648?v=3","gravatar_id":"","url":"https://api.github.com/users/teralytics","html_url":"https://github.com/teralytics","followers_url":"https://api.github.com/users/teralytics/followers","following_url":"https://api.github.com/users/teralytics/following{/other_user}","gists_url":"https://api.github.com/users/teralytics/gists{/gist_id}","starred_url":"https://api.github.com/users/teralytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teralytics/subscriptions","organizations_url":"https://api.github.com/users/teralytics/orgs","repos_url":"https://api.github.com/users/teralytics/repos","events_url":"https://api.github.com/users/teralytics/events{/privacy}","received_events_url":"https://api.github.com/users/teralytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teralytics/ansible-postgresql","description":"Ansible role for PostgreSQL","fork":true,"url":"https://api.github.com/repos/teralytics/ansible-postgresql","forks_url":"https://api.github.com/repos/teralytics/ansible-postgresql/forks","keys_url":"https://api.github.com/repos/teralytics/ansible-postgresql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teralytics/ansible-postgresql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teralytics/ansible-postgresql/teams","hooks_url":"https://api.github.com/repos/teralytics/ansible-postgresql/hooks","issue_events_url":"https://api.github.com/repos/teralytics/ansible-postgresql/issues/events{/number}","events_url":"https://api.github.com/repos/teralytics/ansible-postgresql/events","assignees_url":"https://api.github.com/repos/teralytics/ansible-postgresql/assignees{/user}","branches_url":"https://api.github.com/repos/teralytics/ansible-postgresql/branches{/branch}","tags_url":"https://api.github.com/repos/teralytics/ansible-postgresql/tags","blobs_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/refs{/sha}","trees_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teralytics/ansible-postgresql/statuses/{sha}","languages_url":"https://api.github.com/repos/teralytics/ansible-postgresql/languages","stargazers_url":"https://api.github.com/repos/teralytics/ansible-postgresql/stargazers","contributors_url":"https://api.github.com/repos/teralytics/ansible-postgresql/contributors","subscribers_url":"https://api.github.com/repos/teralytics/ansible-postgresql/subscribers","subscription_url":"https://api.github.com/repos/teralytics/ansible-postgresql/subscription","commits_url":"https://api.github.com/repos/teralytics/ansible-postgresql/commits{/sha}","git_commits_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/commits{/sha}","comments_url":"https://api.github.com/repos/teralytics/ansible-postgresql/comments{/number}","issue_comment_url":"https://api.github.com/repos/teralytics/ansible-postgresql/issues/comments{/number}","contents_url":"https://api.github.com/repos/teralytics/ansible-postgresql/contents/{+path}","compare_url":"https://api.github.com/repos/teralytics/ansible-postgresql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teralytics/ansible-postgresql/merges","archive_url":"https://api.github.com/repos/teralytics/ansible-postgresql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teralytics/ansible-postgresql/downloads","issues_url":"https://api.github.com/repos/teralytics/ansible-postgresql/issues{/number}","pulls_url":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls{/number}","milestones_url":"https://api.github.com/repos/teralytics/ansible-postgresql/milestones{/number}","notifications_url":"https://api.github.com/repos/teralytics/ansible-postgresql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teralytics/ansible-postgresql/labels{/name}","releases_url":"https://api.github.com/repos/teralytics/ansible-postgresql/releases{/id}","deployments_url":"https://api.github.com/repos/teralytics/ansible-postgresql/deployments","created_at":"2016-04-01T12:16:32Z","updated_at":"2016-04-01T12:18:14Z","pushed_at":"2016-09-07T09:34:35Z","git_url":"git://github.com/teralytics/ansible-postgresql.git","ssh_url":"git@github.com:teralytics/ansible-postgresql.git","clone_url":"https://github.com/teralytics/ansible-postgresql.git","svn_url":"https://github.com/teralytics/ansible-postgresql","homepage":null,"size":252,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"teralytics:master","ref":"master","sha":"475e292f505be0d99cc20e2517043c30353a092c","user":{"login":"teralytics","id":3001648,"avatar_url":"https://avatars.githubusercontent.com/u/3001648?v=3","gravatar_id":"","url":"https://api.github.com/users/teralytics","html_url":"https://github.com/teralytics","followers_url":"https://api.github.com/users/teralytics/followers","following_url":"https://api.github.com/users/teralytics/following{/other_user}","gists_url":"https://api.github.com/users/teralytics/gists{/gist_id}","starred_url":"https://api.github.com/users/teralytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teralytics/subscriptions","organizations_url":"https://api.github.com/users/teralytics/orgs","repos_url":"https://api.github.com/users/teralytics/repos","events_url":"https://api.github.com/users/teralytics/events{/privacy}","received_events_url":"https://api.github.com/users/teralytics/received_events","type":"Organization","site_admin":false},"repo":{"id":55230187,"name":"ansible-postgresql","full_name":"teralytics/ansible-postgresql","owner":{"login":"teralytics","id":3001648,"avatar_url":"https://avatars.githubusercontent.com/u/3001648?v=3","gravatar_id":"","url":"https://api.github.com/users/teralytics","html_url":"https://github.com/teralytics","followers_url":"https://api.github.com/users/teralytics/followers","following_url":"https://api.github.com/users/teralytics/following{/other_user}","gists_url":"https://api.github.com/users/teralytics/gists{/gist_id}","starred_url":"https://api.github.com/users/teralytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teralytics/subscriptions","organizations_url":"https://api.github.com/users/teralytics/orgs","repos_url":"https://api.github.com/users/teralytics/repos","events_url":"https://api.github.com/users/teralytics/events{/privacy}","received_events_url":"https://api.github.com/users/teralytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teralytics/ansible-postgresql","description":"Ansible role for PostgreSQL","fork":true,"url":"https://api.github.com/repos/teralytics/ansible-postgresql","forks_url":"https://api.github.com/repos/teralytics/ansible-postgresql/forks","keys_url":"https://api.github.com/repos/teralytics/ansible-postgresql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teralytics/ansible-postgresql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teralytics/ansible-postgresql/teams","hooks_url":"https://api.github.com/repos/teralytics/ansible-postgresql/hooks","issue_events_url":"https://api.github.com/repos/teralytics/ansible-postgresql/issues/events{/number}","events_url":"https://api.github.com/repos/teralytics/ansible-postgresql/events","assignees_url":"https://api.github.com/repos/teralytics/ansible-postgresql/assignees{/user}","branches_url":"https://api.github.com/repos/teralytics/ansible-postgresql/branches{/branch}","tags_url":"https://api.github.com/repos/teralytics/ansible-postgresql/tags","blobs_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/refs{/sha}","trees_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teralytics/ansible-postgresql/statuses/{sha}","languages_url":"https://api.github.com/repos/teralytics/ansible-postgresql/languages","stargazers_url":"https://api.github.com/repos/teralytics/ansible-postgresql/stargazers","contributors_url":"https://api.github.com/repos/teralytics/ansible-postgresql/contributors","subscribers_url":"https://api.github.com/repos/teralytics/ansible-postgresql/subscribers","subscription_url":"https://api.github.com/repos/teralytics/ansible-postgresql/subscription","commits_url":"https://api.github.com/repos/teralytics/ansible-postgresql/commits{/sha}","git_commits_url":"https://api.github.com/repos/teralytics/ansible-postgresql/git/commits{/sha}","comments_url":"https://api.github.com/repos/teralytics/ansible-postgresql/comments{/number}","issue_comment_url":"https://api.github.com/repos/teralytics/ansible-postgresql/issues/comments{/number}","contents_url":"https://api.github.com/repos/teralytics/ansible-postgresql/contents/{+path}","compare_url":"https://api.github.com/repos/teralytics/ansible-postgresql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teralytics/ansible-postgresql/merges","archive_url":"https://api.github.com/repos/teralytics/ansible-postgresql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teralytics/ansible-postgresql/downloads","issues_url":"https://api.github.com/repos/teralytics/ansible-postgresql/issues{/number}","pulls_url":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls{/number}","milestones_url":"https://api.github.com/repos/teralytics/ansible-postgresql/milestones{/number}","notifications_url":"https://api.github.com/repos/teralytics/ansible-postgresql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teralytics/ansible-postgresql/labels{/name}","releases_url":"https://api.github.com/repos/teralytics/ansible-postgresql/releases{/id}","deployments_url":"https://api.github.com/repos/teralytics/ansible-postgresql/deployments","created_at":"2016-04-01T12:16:32Z","updated_at":"2016-04-01T12:18:14Z","pushed_at":"2016-09-07T09:34:35Z","git_url":"git://github.com/teralytics/ansible-postgresql.git","ssh_url":"git@github.com:teralytics/ansible-postgresql.git","clone_url":"https://github.com/teralytics/ansible-postgresql.git","svn_url":"https://github.com/teralytics/ansible-postgresql","homepage":null,"size":252,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/2"},"html":{"href":"https://github.com/teralytics/ansible-postgresql/pull/2"},"issue":{"href":"https://api.github.com/repos/teralytics/ansible-postgresql/issues/2"},"comments":{"href":"https://api.github.com/repos/teralytics/ansible-postgresql/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/teralytics/ansible-postgresql/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/teralytics/ansible-postgresql/statuses/231ed07985c2aea2b179d63545a06331206698fa"}}}}
{"actor":{"display_login":"lhoss"}}