{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2731","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2731/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2731/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2731/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/2731","id":123768401,"number":2731,"title":"postgresql_db should support dump and import states like mysql_db does","user":{"login":"jd-boyd","id":361465,"avatar_url":"https://avatars.githubusercontent.com/u/361465?v=3","gravatar_id":"","url":"https://api.github.com/users/jd-boyd","html_url":"https://github.com/jd-boyd","followers_url":"https://api.github.com/users/jd-boyd/followers","following_url":"https://api.github.com/users/jd-boyd/following{/other_user}","gists_url":"https://api.github.com/users/jd-boyd/gists{/gist_id}","starred_url":"https://api.github.com/users/jd-boyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jd-boyd/subscriptions","organizations_url":"https://api.github.com/users/jd-boyd/orgs","repos_url":"https://api.github.com/users/jd-boyd/repos","events_url":"https://api.github.com/users/jd-boyd/events{/privacy}","received_events_url":"https://api.github.com/users/jd-boyd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-24T07:03:07Z","updated_at":"2015-12-24T07:03:07Z","closed_at":null,"body":"##### Issue Type:\r\n\r\n  - Feature Idea\r\n\r\n##### Ansible Version:\r\n```\r\nansible 1.9.1\r\n  configured module search path = None\r\n```\r\n\r\n##### Ansible Configuration:\r\n\r\nN/A\r\n\r\n##### Environment:\r\n\r\nN/A\r\n\r\n##### Summary:\r\n\r\nThe postgresql_db module should support the dump state like the mysql_db module does.\r\n\r\n##### Steps To Reproduce:\r\n\r\nExample playbook for dump:\r\n\r\n    ---\r\n    - hosts: postgres-server\r\n      tasks:\r\n      - name: backup db server\r\n        postgresql_db: name={{item}} state=dump target=/{{item}}-{{ansible_date_time.iso8601}}.sql\r\n        with_items: db_name\r\n\r\nExample playbook for import:\r\n\r\n    ---\r\n    - hosts: postgres-server\r\n      tasks:\r\n      - name: Restore db server\r\n        postgresql_db: name=example state=import target=/example.sql\r\n\r\n##### Expected Results:\r\n\r\nThat a database would be dumped or imported to/from a file named in the target parameter.\r\n\r\n##### Actual Results:\r\n\r\n    TASK: [backup db server] ****************************************************** \r\n    failed: [xxx.xxx.xxx.xxx] => (item=db_name) => {\"failed\": true, \"item\": \"db_name\"}\r\n    msg: unsupported parameter for module: target\r\n\r\n    FATAL: all hosts have already failed -- aborting\r\n\r\n    PLAY RECAP ******************************************************************** \r\n"}}