community.postgresql icon indicating copy to clipboard operation
community.postgresql copied to clipboard

Copy data to/from Ansible host

Open alehaa opened this issue 3 years ago • 2 comments

SUMMARY

Like \copy in psql, it would be nice to copy the data to/from the ansible_host instead of the PostgreSQL server. In psql afaik this is achieved using STDOUT / STDIN and redirection.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

Module postgresql_copy.

ADDITIONAL INFORMATION
  • Paths used in copy_from / copy_to should be allowed relative and be searched in ./files folder.
  • An extra parameter should describe, whether to store the file on the database host (requires administrator rights) or local at the Ansible host.

alehaa avatar Mar 28 '22 13:03 alehaa

It would be cool to see this feature for other modules using files (e.g. postgresql_db) too.

alehaa avatar Mar 28 '22 16:03 alehaa

@alehaa hi, thanks for the feedback! I'll put labels that the issue is vacant for review and implementation (if there's a consensus among reviewers)

Andersson007 avatar Mar 31 '22 11:03 Andersson007