Giter Site home page Giter Site logo

gilesw / ansible-postgresql_exec Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 55 KB

Ansible module to run Postgres SQL statements with pycog2 forked from https://github.com/jirutka/ansible-modules

License: GNU General Public License v3.0

Python 94.52% Shell 5.48%

ansible-postgresql_exec's People

Contributors

jirutka avatar

Watchers

 avatar

ansible-postgresql_exec's Issues

Fails to work under mitogen

- name: create pg_trgm and ltree extension for indexing like queries
  postgresql_exec:
    content: "{{ item }}"
    db: "wibble"
    login_host: "localhost"
    login_user: "wibble"
    login_password: "wibble"
  with_items:
    - "create extension if not exists pg_trgm"
    - "create extension if not exists ltree"
  ignore_errors: true
  run_once: true
  changed_when: False
2019-02-28 15:43:26,087 p=21097 u=gilesadm |  ERROR! [pid 21115] 15:43:26.087054 I mitogen.ctx.ssh.xxxx: stderr:     self._return_formatted(kwargs)
2019-02-28 15:43:26,152 p=21097 u=gilesadm |  ERROR! [pid 21115] 15:43:26.152651 I mitogen.ctx.ssh.xxxx: stderr:   File "master:/opt/python-tools/lib/python2.7/site-packages/ansible/module_utils/basic.py", line 2342, in _return_formatted
2019-02-28 15:43:26,153 p=21097 u=gilesadm |  ERROR! [pid 21115] 15:43:26.152955 I mitogen.ctx.ssh.xxxx: stderr:     print('\n%s' % self.jsonify(kwargs))
2019-02-28 15:43:26,153 p=21097 u=gilesadm |  ERROR! [pid 21115] 15:43:26.153250 I mitogen.ctx.ssh.cspbwbluclprt160x1.ext.dyn.semcs.net: stderr: ValueError: I/O operation on closed file
2019-02-28 15:43:26,153 p=21097 u=gilesadm |  [pid 21115] 15:43:26.153545 D mitogen.ctx.ssh.xxxx: mitogen: _dispatch_calls: Message(1004, 2009, 0, 101, 1003, '\x80\x02(U,devgiles01c-21356-7fb50a767700-582f626abf77eq'..1747) -> CallError(u'exceptions.AttributeError: \'file\' object has no attribute \'getvalue\'\n  File "<stdin>", line 3078, in _dispatch_one\n  File "master:/home.local/gilesadm/work/ansible-config/mitogen-0.2.5/ansible_mitogen/target.py", line 430, in run_module\n    return impl.run()\n  File "master:/home.local/gilesadm/work/ansible-config/mitogen-0.2.5/ansible_mitogen/runner.py", line 382, in run\n    return self._run()\n  File "master:/home.local/gilesadm/work/ansible-config/mitogen-0.2.5/ansible_mitogen/runner.py", line 887, in _run\n    u\'stdout\': mitogen.core.to_text(sys.stdout.getvalue()),\n',)

runs fine on standard with output:-

ok: [xxxx] => (item=create extension if not exists ltree) => {"changed": false, "item": "create extension if not exists ltree", "rowcount": -1, "rowfirst": null, "rows": null, "statusmessage": "CREATE EXTENSION"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.