tinkersnoopy

ansible postgres create db

Mar 9th, 2021
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.83 KB | None | 0 0
  1. TASK [Create a new database with name "dell-demo" and specific encoding and locale] *************************************************************
  2. task path: /Users/juergen/Documents/DPSCodeAcademy/Ansible/#dev/aws/CreateProgresDB.yaml:28
  3. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> ESTABLISH SSH CONNECTION FOR USER: centos
  4. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="centos"' -o ConnectTimeout=10 -o ControlPath=/Users/juergen/.ansible/cp/629f36d032 ec2-35-156-158-120.eu-central-1.compute.amazonaws.com '/bin/sh -c '"'"'echo ~centos && sleep 0'"'"''
  5. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> (0, b'/home/centos\n', b'')
  6. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> ESTABLISH SSH CONNECTION FOR USER: centos
  7. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="centos"' -o ConnectTimeout=10 -o ControlPath=/Users/juergen/.ansible/cp/629f36d032 ec2-35-156-158-120.eu-central-1.compute.amazonaws.com '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /var/tmp `"&& mkdir "` echo /var/tmp/ansible-tmp-1615291916.465491-44700-123503964238934 `" && echo ansible-tmp-1615291916.465491-44700-123503964238934="` echo /var/tmp/ansible-tmp-1615291916.465491-44700-123503964238934 `" ) && sleep 0'"'"''
  8. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> (0, b'ansible-tmp-1615291916.465491-44700-123503964238934=/var/tmp/ansible-tmp-1615291916.465491-44700-123503964238934\n', b'')
  9. redirecting (type: modules) ansible.builtin.postgresql_db to community.general.postgresql_db
  10. Using module file /usr/local/Cellar/ansible/2.10.4/libexec/lib/python3.9/site-packages/ansible_collections/community/general/plugins/modules/postgresql_db.py
  11. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> PUT /Users/juergen/.ansible/tmp/ansible-local-44683qgj7m7nz/tmp0i1tm6lb TO /var/tmp/ansible-tmp-1615291916.465491-44700-123503964238934/AnsiballZ_postgresql_db.py
  12. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="centos"' -o ConnectTimeout=10 -o ControlPath=/Users/juergen/.ansible/cp/629f36d032 '[ec2-35-156-158-120.eu-central-1.compute.amazonaws.com]'
  13. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> (0, b'sftp> put /Users/juergen/.ansible/tmp/ansible-local-44683qgj7m7nz/tmp0i1tm6lb /var/tmp/ansible-tmp-1615291916.465491-44700-123503964238934/AnsiballZ_postgresql_db.py\n', b'')
  14. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> ESTABLISH SSH CONNECTION FOR USER: centos
  15. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="centos"' -o ConnectTimeout=10 -o ControlPath=/Users/juergen/.ansible/cp/629f36d032 ec2-35-156-158-120.eu-central-1.compute.amazonaws.com '/bin/sh -c '"'"'setfacl -m u:postgres:r-x /var/tmp/ansible-tmp-1615291916.465491-44700-123503964238934/ /var/tmp/ansible-tmp-1615291916.465491-44700-123503964238934/AnsiballZ_postgresql_db.py && sleep 0'"'"''
  16. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> (0, b'', b'')
  17. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> ESTABLISH SSH CONNECTION FOR USER: centos
  18. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="centos"' -o ConnectTimeout=10 -o ControlPath=/Users/juergen/.ansible/cp/629f36d032 -tt ec2-35-156-158-120.eu-central-1.compute.amazonaws.com '/bin/sh -c '"'"'sudo -H -S -n -u postgres /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-erkitccqpmkrdlpzmkbkzopwlnqpuepk ; /usr/bin/python /var/tmp/ansible-tmp-1615291916.465491-44700-123503964238934/AnsiballZ_postgresql_db.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
  19. Escalation succeeded
  20. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> (0, b'\r\n{"invocation": {"module_args": {"session_role": null, "ssl_mode": "prefer", "encoding": "UTF-8", "login_user": "postgres", "lc_collate": "", "owner": "", "port": 5432, "target_opts": "", "state": "present", "template": "template0", "maintenance_db": "postgres", "ca_cert": null, "login_host": "", "db": "delldemo", "conn_limit": "", "login_unix_socket": "", "tablespace": "", "login_password": "", "name": "delldemo", "target": "", "lc_ctype": "", "trust_input": true, "dump_extra_args": null}}, "executed_commands": [], "changed": false, "db": "delldemo"}\r\n', b'Shared connection to ec2-35-156-158-120.eu-central-1.compute.amazonaws.com closed.\r\n')
  21. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> ESTABLISH SSH CONNECTION FOR USER: centos
  22. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="centos"' -o ConnectTimeout=10 -o ControlPath=/Users/juergen/.ansible/cp/629f36d032 ec2-35-156-158-120.eu-central-1.compute.amazonaws.com '/bin/sh -c '"'"'rm -f -r /var/tmp/ansible-tmp-1615291916.465491-44700-123503964238934/ > /dev/null 2>&1 && sleep 0'"'"''
  23. <ec2-35-156-158-120.eu-central-1.compute.amazonaws.com> (0, b'', b'')
  24. ok: [ec2-35-156-158-120.eu-central-1.compute.amazonaws.com] => {
  25. "changed": false,
  26. "db": "delldemo",
  27. "executed_commands": [],
  28. "invocation": {
  29. "module_args": {
  30. "ca_cert": null,
  31. "conn_limit": "",
  32. "db": "delldemo",
  33. "dump_extra_args": null,
  34. "encoding": "UTF-8",
  35. "lc_collate": "",
  36. "lc_ctype": "",
  37. "login_host": "",
  38. "login_password": "",
  39. "login_unix_socket": "",
  40. "login_user": "postgres",
  41. "maintenance_db": "postgres",
  42. "name": "delldemo",
  43. "owner": "",
  44. "port": 5432,
  45. "session_role": null,
  46. "ssl_mode": "prefer",
  47. "state": "present",
  48. "tablespace": "",
  49. "target": "",
  50. "target_opts": "",
  51. "template": "template0",
  52. "trust_input": true
  53. }
  54. }
  55. }
  56. META: ran handlers
  57. META: ran handlers
Advertisement
Add Comment
Please, Sign In to add comment