Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to work under mitogen #1

Open
gilesw opened this issue Feb 28, 2019 · 0 comments
Open

Fails to work under mitogen #1

gilesw opened this issue Feb 28, 2019 · 0 comments

Comments

@gilesw
Copy link
Owner

gilesw commented Feb 28, 2019

- 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"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant