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

postgresql_query cannot handle interval type #47

Closed
markwort opened this issue Jan 29, 2021 · 7 comments · Fixed by #51
Closed

postgresql_query cannot handle interval type #47

markwort opened this issue Jan 29, 2021 · 7 comments · Fixed by #51

Comments

@markwort
Copy link

Hey, first off: thanks for this great collection of modules, I find them very useful!

SUMMARY

When trying to SELECT a field of type interval (a PostgreSQL type describing time intervals), postgresql_query fails with

TypeError: Value of unknown type: <class 'datetime.timedelta'>

This datetime.timedelta type seems to come from psycopg2...

I stumbled across this when querying pg_stat_replication, which contains a few columns with type interval.
The funny thing is: as long as e.g. replay_lag is null (meaning there is essentially no time difference between the production of WAL and replaying of the same on a replica) the query works fine. But as soon as there is an actual interval present, execution fails.

I hope this is quite an easy issue to solve, I think it could work when we simply return the datetime.timedelta as a String.

In the meantime, it is possible to work around this issue by casting to epoch or another date/time type in PostgreSQL.

Please let me know if or how I can be of further help when fixing this.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

postgresql_query

ANSIBLE VERSION
ansible 2.9.16
  config file = /home/julian/test_project/ansible.cfg
  configured module search path = ['/home/julian/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.9.1 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)]
CONFIGURATION
ANSIBLE_PIPELINING(/home/julian/test_project/ansible.cfg) = True
CACHE_PLUGIN(/home/julian/test_project/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/home/julian/test_project/ansible.cfg) = /tmp/ansible_cache/
CACHE_PLUGIN_TIMEOUT(/home/julian/test_project/ansible.cfg) = 86400
DEFAULT_BECOME(/home/julian/test_project/ansible.cfg) = True
DEFAULT_GATHERING(/home/julian/test_project/ansible.cfg) = smart
DEFAULT_REMOTE_USER(/home/julian/test_project/ansible.cfg) = vagrant
HOST_KEY_CHECKING(/home/julian/test_project/ansible.cfg) = False
OS / ENVIRONMENT

Controller:

  • Fedora 33
  • Python 3.9.1
    Hosts:
  • Ubuntu 20.04 Focal Fossa
  • Python 3.8.5
  • python3-psycopg2/focal,now 2.8.4-2 amd64
  • PostgreSQL 12.5 (installed from postgresql.org) psql (12.5 (Ubuntu 12.5-0ubuntu0.20.04.1))
STEPS TO REPRODUCE

Here's a playbook which should be able to reproduce the issue. In my project, there are a few members to the database cluster, that's why all tasks are only run once.

- hosts: db_hosts
  tasks:
  - name: try selecting interval as epoch
    run_once: true
    become: yes
    become_user: postgres
    postgresql_query:
      port: "{{postgres_port}}"
      query: "SELECT EXTRACT(epoch from make_interval(secs => 3));"
    register: interval_epoch_out

  - run_once: true
    debug:
      var: interval_epoch_out

  - name: try selecting interval
    run_once: true
    become: yes
    become_user: postgres
    postgresql_query:
      port: "{{postgres_port}}"
      query: "SELECT make_interval(secs => 3);"
    register: interval_out

  - run_once: true
    debug:
      var: interval_out

The first task (and debug) run fine, but the execution fails on the second usage of postgresql_query.

Here's the same data retrieved by psycopg2:

>>> import psycopg2
>>> conn = psycopg2.connect("dbname=postgres user=postgres")
>>> cur = conn.cursor()
>>> cur.execute("SELECT EXTRACT(epoch from make_interval(secs => 3));")
>>> cur.fetchone()
(3.0,)
>>> cur.execute("SELECT make_interval(secs => 3);")
>>> x = cur.fetchone()
>>> print(x)
(datetime.timedelta(seconds=3),)
>>> print(x[0])
0:00:03
>>> cur.close()
>>> conn.close()
>>> exit
EXPECTED RESULTS
PLAY [db_hosts] ***********************************************************************************************************************************************

TASK [try selecting interval as epoch] ************************************************************************************************************************
[WARNING]: Database name has not been passed, used default database to connect to.
ok: [node1]

TASK [debug] **************************************************************************************************************************************************
ok: [node1] => {
    "interval_epoch_out": {
        "changed": false,
        "failed": false,
        "query": "SELECT EXTRACT(epoch from make_interval(secs => 3));",
        "query_result": [
            {
                "date_part": 3.0
            }
        ],
        "rowcount": 1,
        "statusmessage": "SELECT 1",
        "warnings": [
            "Database name has not been passed, used default database to connect to."
        ]
    }
}

TASK [try selecting interval] *********************************************************************************************************************************
[WARNING]: Database name has not been passed, used default database to connect to.
ok: [node1]

TASK [debug] **************************************************************************************************************************************************
ok: [node1] => {
    "interval_epoch_out": {
        "changed": false,
        "failed": false,
        "query": "SELECT make_interval(secs => 3);",
        "query_result": [
            {
                "interval": "0:00:03"
            }
        ],
        "rowcount": 1,
        "statusmessage": "SELECT 1",
        "warnings": [
            "Database name has not been passed, used default database to connect to."
        ]
    }
}


PLAY RECAP ****************************************************************************************************************************************************
node1                      : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
ACTUAL RESULTS
PLAY [db_hosts] ***********************************************************************************************************************************************

TASK [try selecting interval as epoch] ************************************************************************************************************************
[WARNING]: Database name has not been passed, used default database to connect to.
ok: [node1]

TASK [debug] **************************************************************************************************************************************************
ok: [node1] => {
    "interval_epoch_out": {
        "changed": false,
        "failed": false,
        "query": "SELECT EXTRACT(epoch from make_interval(secs => 3));",
        "query_result": [
            {
                "date_part": 3.0
            }
        ],
        "rowcount": 1,
        "statusmessage": "SELECT 1",
        "warnings": [
            "Database name has not been passed, used default database to connect to."
        ]
    }
}

TASK [try selecting interval] *********************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: Value of unknown type: <class 'datetime.timedelta'>, 0:00:03
fatal: [node1]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 102, in <module>\n  File \"<stdin>\", line 94, in _ansiballz_main\n  File \"<stdin>\", line 40, in invoke_module\n  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_postgresql_query_payload_2z2dmvfp/ansible_postgresql_query_payload.zip/ansible/modules/database/postgresql/postgresql_query.py\", line 350, in <module>\n  File \"/tmp/ansible_postgresql_query_payload_2z2dmvfp/ansible_postgresql_query_payload.zip/ansible/modules/database/postgresql/postgresql_query.py\", line 346, in main\n  File \"/tmp/ansible_postgresql_query_payload_2z2dmvfp/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py\", line 2168, in exit_json\n  File \"/tmp/ansible_postgresql_query_payload_2z2dmvfp/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py\", line 2161, in _return_formatted\n  File \"/tmp/ansible_postgresql_query_payload_2z2dmvfp/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py\", line 426, in remove_values\n  File \"/tmp/ansible_postgresql_query_payload_2z2dmvfp/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py\", line 403, in _remove_values_conditions\nTypeError: Value of unknown type: <class 'datetime.timedelta'>, 0:00:03\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

NO MORE HOSTS LEFT ********************************************************************************************************************************************

PLAY RECAP ****************************************************************************************************************************************************
node1                      : ok=2    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Here's more verbose output of the failed task:

TASK [try selecting interval] *********************************************************************************************************************************
task path: /home/julian/test_project/postgresql_query_reproducer.yml:16
Using module file /usr/lib/python3.9/site-packages/ansible/modules/database/postgresql/postgresql_query.py
Pipelining is enabled.
<192.168.178.221> ESTABLISH SSH CONNECTION FOR USER: vagrant
<192.168.178.221> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="misc/vagrant_ubuntu_focal/.vagrant/machines/ubuntu-focal-node-1/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="vagrant"' -o ConnectTimeout=10 -o ControlPath=/home/julian/.ansible/cp/4983164cf0 192.168.178.221 '/bin/sh -c '"'"'sudo -H -S -n  -u postgres /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-lvleoubjilhmusqcpwkppbrqwrsisqkl ; /usr/bin/python3'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<192.168.178.221> (1, b'', b'OpenSSH_8.4p1, OpenSSL 1.1.1i FIPS  8 Dec 2020\r\ndebug1: Reading configuration data /home/julian/.ssh/config\r\ndebug1: /home/julian/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf\r\ndebug2: checking match for \'final all\' host 192.168.178.221 originally 192.168.178.221\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched \'final\'\r\ndebug2: match not found\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]\r\ndebug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]\r\ndebug1: configuration requests final Match pass\r\ndebug2: resolve_canonicalize: hostname 192.168.178.221 is address\r\ndebug1: re-parsing configuration\r\ndebug1: Reading configuration data /home/julian/.ssh/config\r\ndebug1: /home/julian/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf\r\ndebug2: checking match for \'final all\' host 192.168.178.221 originally 192.168.178.221\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched \'final\'\r\ndebug2: match found\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]\r\ndebug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts\' -> \'/home/julian/.ssh/known_hosts\'\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts2\' -> \'/home/julian/.ssh/known_hosts2\'\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 308806\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\nTraceback (most recent call last):\n  File "<stdin>", line 102, in <module>\n  File "<stdin>", line 94, in _ansiballz_main\n  File "<stdin>", line 40, in invoke_module\n  File "/usr/lib/python3.8/runpy.py", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code\n    exec(code, run_globals)\n  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/modules/database/postgresql/postgresql_query.py", line 350, in <module>\n  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/modules/database/postgresql/postgresql_query.py", line 346, in main\n  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py", line 2168, in exit_json\n  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py", line 2161, in _return_formatted\n  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py", line 426, in remove_values\n  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py", line 403, in _remove_values_conditions\nTypeError: Value of unknown type: <class \'datetime.timedelta\'>, 0:00:03\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n')
<192.168.178.221> Failed to connect to the host via ssh: OpenSSH_8.4p1, OpenSSL 1.1.1i FIPS  8 Dec 2020
debug1: Reading configuration data /home/julian/.ssh/config
debug1: /home/julian/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug2: checking match for 'final all' host 192.168.178.221 originally 192.168.178.221
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched 'final'
debug2: match not found
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
debug1: configuration requests final Match pass
debug2: resolve_canonicalize: hostname 192.168.178.221 is address
debug1: re-parsing configuration
debug1: Reading configuration data /home/julian/.ssh/config
debug1: /home/julian/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug2: checking match for 'final all' host 192.168.178.221 originally 192.168.178.221
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched 'final'
debug2: match found
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/julian/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/julian/.ssh/known_hosts2'
debug1: auto-mux: Trying existing master
debug2: fd 4 setting O_NONBLOCK
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_forwards: request forwardings: 0 local, 0 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 308806
debug3: mux_client_request_session: session request sent
debug1: mux_client_request_session: master session id: 2
Traceback (most recent call last):
  File "<stdin>", line 102, in <module>
  File "<stdin>", line 94, in _ansiballz_main
  File "<stdin>", line 40, in invoke_module
  File "/usr/lib/python3.8/runpy.py", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/modules/database/postgresql/postgresql_query.py", line 350, in <module>
  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/modules/database/postgresql/postgresql_query.py", line 346, in main
  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py", line 2168, in exit_json
  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py", line 2161, in _return_formatted
  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py", line 426, in remove_values
  File "/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py", line 403, in _remove_values_conditions
TypeError: Value of unknown type: <class 'datetime.timedelta'>, 0:00:03
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 1
fatal: [node1]: FAILED! => {
    "changed": false,
    "module_stderr": "OpenSSH_8.4p1, OpenSSL 1.1.1i FIPS  8 Dec 2020\r\ndebug1: Reading configuration data /home/julian/.ssh/config\r\ndebug1: /home/julian/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf\r\ndebug2: checking match for 'final all' host 192.168.178.221 originally 192.168.178.221\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched 'final'\r\ndebug2: match not found\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]\r\ndebug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]\r\ndebug1: configuration requests final Match pass\r\ndebug2: resolve_canonicalize: hostname 192.168.178.221 is address\r\ndebug1: re-parsing configuration\r\ndebug1: Reading configuration data /home/julian/.ssh/config\r\ndebug1: /home/julian/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf\r\ndebug2: checking match for 'final all' host 192.168.178.221 originally 192.168.178.221\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched 'final'\r\ndebug2: match found\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]\r\ndebug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/julian/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/julian/.ssh/known_hosts2'\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 308806\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\nTraceback (most recent call last):\n  File \"<stdin>\", line 102, in <module>\n  File \"<stdin>\", line 94, in _ansiballz_main\n  File \"<stdin>\", line 40, in invoke_module\n  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/modules/database/postgresql/postgresql_query.py\", line 350, in <module>\n  File \"/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/modules/database/postgresql/postgresql_query.py\", line 346, in main\n  File \"/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py\", line 2168, in exit_json\n  File \"/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py\", line 2161, in _return_formatted\n  File \"/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py\", line 426, in remove_values\n  File \"/tmp/ansible_postgresql_query_payload_fh11zb4h/ansible_postgresql_query_payload.zip/ansible/module_utils/basic.py\", line 403, in _remove_values_conditions\nTypeError: Value of unknown type: <class 'datetime.timedelta'>, 0:00:03\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
@markwort markwort changed the title postgresql_query cannot handle interval type postgresql_query cannot handle interval type Jan 29, 2021
@Andersson007
Copy link
Collaborator

@markwort thanks reporting the issue! Nice to hear that people find the collection useful!

CC @Dorn- @andytom @ilicmilan @kostiantyn-nemchenko @matburt @nerzhul @sebasmannem @tcraxs

if anybody wants to fix this (see recently merged #46 as an example), please, put your intention here ASAP not to work in parallel (I'll also do it if I decide). Thanks!

@Andersson007
Copy link
Collaborator

FYI: I'm looking at this

@Andersson007
Copy link
Collaborator

I created a PR. It's ready for review
@markwort if the solution looks good to you, please put shipit in the PR

@Andersson007
Copy link
Collaborator

there were unrelated CI issues, fixed now

@markwort
Copy link
Author

markwort commented Feb 4, 2021

Nice!
I wasn't counting on such a fast resolution.
Sorry it took me a few days to get back to you, I had other duties and now it took me more than I care to admit to get a development environment of ansible running here :)
In the end I learned something new about ansible and how collections work 👍

I verified it and now it works as expected:

TASK [try selecting interval] *********************************************************************************************************************************
ok: [node1]

TASK [debug] **************************************************************************************************************************************************
ok: [node1] => {
    "interval_out": {
        "changed": false,
        "failed": false,
        "query": "SELECT make_interval(secs => 3);",
        "query_all_results": [
            [
                {
                    "make_interval": "0:00:03"
                }
            ]
        ],
        "query_list": [
            "SELECT make_interval(secs => 3);"
        ],
        "query_result": [
            {
                "make_interval": "0:00:03"
            }
        ],
        "rowcount": 1,
        "statusmessage": "SELECT 1",
        "warnings": [
            "Database name has not been passed, used default database to connect to."
        ]
    }
}

If I run into something like this again, now I'll now where to start looking.

@Andersson007
Copy link
Collaborator

@markwort thanks for the feedback!

@Andersson007
Copy link
Collaborator

I backported the fix to 2.9 and hope that it'll be merged soon

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Feb 25, 2021
v2.9.18
=======

Release Summary
---------------

| Release Date: 2021-02-18
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-test - The ``pylint`` sanity test is now supported on Python 3.8.
- inventory cache - do not show a warning when the cache file does not (yet) exist.

Security Fixes
--------------

- **security issue** - Mask default and fallback values for ``no_log`` module options (CVE-2021-20228)
- _sf_account_manager - `initiator_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- _sf_account_manager - `target_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_active_directory - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_active_directory - `secret_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_filesystems - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_filesystems - `secret_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_pool - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_pool - `secret_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_snapshots - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- aws_netapp_cvs_snapshots - `secret_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- bitbucket_pipeline_variable - hide user sensitive information which are marked as ``secured`` from logging into the console (ansible-collections/community.general#1635) (CVE-2021-20180).
- ce_vrrp - `auth_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- cp_mgmt_vpn_community_meshed - `shared_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- cp_mgmt_vpn_community_star - `shared_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- docker_swarm - `signing_ca_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_backend_service - `oauth2_client_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_disk - `disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_disk - `source_image_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_disk - `source_snapshot_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_image - `image_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_image - `source_disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_instance_template - `disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_instance_template - `source_image_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_region_disk - `disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_region_disk - `source_snapshot_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_snapshot - `snapshot_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_snapshot - `source_disk_encryption_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_ssl_certificate - `private_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_compute_vpn_tunnel - `shared_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gcp_sql_instance - `client_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- gitlab_runner - `registration_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- iap_start_workflow - `token_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- ibm_sa_host - `iscsi_chap_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- keycloak_client - `auth_client_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- keycloak_client - `registration_access_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- keycloak_clienttemplate - `auth_client_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- keycloak_group - `auth_client_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- librato_annotation - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- na_elementsw_account - `initiator_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- na_elementsw_account - `target_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- netscaler_lb_monitor - `radkey` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- nios_nsgroup - `tsig_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- nxos_aaa_server - `global_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- nxos_pim_interface - `hello_auth_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_firewall_policy - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_load_balancer - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_monitoring_policy - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_private_network - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- oneandone_public_ip - `auth_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- ovirt - `instance_rootpw` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- pagerduty_alert - `api_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- pagerduty_alert - `integration_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- pagerduty_alert - `service_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- pulp_repo - `feed_client_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- rax_clb_ssl - `private_key` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- snmp_facts - hide user sensitive information such as ``privkey`` and ``authkey`` from logging into the console (ansible-collections/community.general#1621) (CVE-2021-20178).
- spotinst_aws_elastigroup - `multai_token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- spotinst_aws_elastigroup - `token` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).
- utm_proxy_auth_profile - `frontend_cookie_secret` is now masked with no_log and no longer emitted in logging/output (CVE-2021-20191).

Bugfixes
--------

- Fix incorrect variable scoping when using ``import with context`` in Jinja2 templates. (ansible/ansible#72615)
- ansible-test - Temporarily limit ``cryptography`` to versions before 3.4 to enable tests to function.
- ansible-test - The ``--remote`` option has been updated for Python 2.7 to work around breaking changes in the newly released ``get-pip.py`` bootstrapper.
- ansible-test - The ``--remote`` option has been updated to use a versioned ``get-pip.py`` bootstrapper to avoid issues with future releases.
- display correct error information when an error exists in the last line of the file (ansible/ansible#16456)
- facts - properly report virtualization facts for Linux guests running on bhyve (ansible/ansible#73167)
- mysql_user - add ``INVOKE LAMBDA`` privilege support (ansible-collections/community.general#283).
- mysql_user - add ``SHOW_ROUTINE`` privilege support (ansible-collections/community.mysql#86).
- mysql_user - add missed privileges to support (ansible-collections/community.general#617).
- pause - do not warn when running in the background if a timeout is provided (ansible/ansible#73042)
- postgresql_info - fix crash caused by wrong PgSQL version parsing (ansible-collections/community.postgresql#40).
- postgresql_ping - fix crash caused by wrong PgSQL version parsing (ansible-collections/community.postgresql#40).
- postgresql_query - fix datetime.timedelta type handling (ansible-collections/community.postgresql#47).
- postgresql_query - fix decimal handling (ansible-collections/community.postgresql#45).
- postgresql_set - return a message instead of traceback when a passed parameter has not been found (ansible-collections/community.postgresql#41).
- psrp connection plugin - ``to_text(stdout)`` before json.loads in psrp.Connection.put_file in case stdout is bytes.
- win_find - Get-FileStat used [int] instead of [int64] for file size calculations

v2.9.17
=======

Release Summary
---------------

| Release Date: 2021-01-18
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-test - Added a ``--export`` option to the ``ansible-test coverage combine`` command to facilitate multi-stage aggregation of coverage in CI pipelines.
- ansible-test - added a ``--venv-system-site-packages`` option for use with the ``--venv`` option
- ansible-test - virtualenv helper scripts now prefer ``venv`` on Python 3 over ``virtualenv`` if the ``ANSIBLE_TEST_PREFER_VENV`` environment variable is set
- bigiq_device_info module - add information on BIG-IQ 7.x support

Bugfixes
--------

- Fix bytestring vs string comparison in module_utils.basic.is_special_selinux_path() so that special-cased filesystems which don't support SELinux context attributes still allow files to be manipulated on them. (ansible/ansible#70244)
- Freeform actions did not work with ``ansible.builtin.`` or ``ansible.legacy.`` FQCN (ansible/ansible#72958).
- async - Fix Python 3 interpreter parsing from module by comparing with bytes (ansible/ansible#70690)
- bigiq_device_info module - fix iteration bug in a _transform_name_attribute method
- docker_image - if ``push=true`` is used with ``repository``, and the image does not need to be tagged, still push. This can happen if ``repository`` and ``name`` are equal (ansible-collections/community.docker#52, ansible-collections/community.docker#53).
- docker_image - report error when loading a broken archive that contains no image (ansible-collections/community.docker#46, ansible-collections/community.docker#55).
- docker_image - report error when the loaded archive does not contain the specified image (ansible-collections/community.docker#41, ansible-collections/community.docker#55).
- inventory - pass the vars dictionary to combine_vars instead of an individual key's value (ansible/ansible#72975).
- k8s - add support for python-kubernetes v12 and later - backport of support in community.kubernetes
- paramiko connection plugin - Ensure we only reset the connection when one has been previously established (ansible/ansible#65812)
- systemd - preserve the full unit name when using a templated service and ``systemd`` failed to parse dbus due to a known bug in ``systemd`` (ansible/ansible#72985)

- unsafe_proxy - Ensure that data within a tuple is marked as unsafe (ansible/ansible#65722)
- user - do the right thing when ``password_lock=True`` and ``password`` are used together (ansible/ansible#72992)


v2.9.16
=======

Release Summary
---------------

| Release Date: 2020-12-14
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-doc - provide ``has_action`` field in JSON output for modules. That information is currently only available in the text view (ansible/ansible#72359).
- ansible-galaxy - find any collection dependencies in the globally configured Galaxy servers and not just the server the parent collection is from.

- ansible-test - Added the ``-remote rhel/7.9`` option to run tests on RHEL 7.9
- ansible-test - Fix container hostname/IP discovery for the ``acme`` test plugin.
- ansible-test - centos6 end of life - container image updated to point to vault base repository (ansible/distro-test-containers#54)
- iptables - reorder comment postition to be at the end (ansible/ansible#71444).
- lvol - fix idempotency issue when using lvol with ``%VG`` or ``%PVS`` size options and VG is fully allocated (ansible-collections/community.general#229).

Bugfixes
--------

- Adjust various hard-coded action names to also include their ``ansible.builtin.`` and ``ansible.legacy.`` prefixed version (ansible/ansible#71817, ansible/ansible#71818, ansible/ansible#71824).
- Collection callbacks were ignoring options and rules for stdout and adhoc cases.
- Fix virt module to support list_vms with a status of paused (ansible/ansible#72059)
- Fixed issue when `netstat` is either missing or doesn't have execution permissions leading to incorrect command being executed.
- Try to load action plugin from the same collection as the module (ansible/ansible#66701)
- account for bug in Python 2.6 that occurs during interpreter shutdown to avoid stack trace
- ansible-test - Correctly detect changes in a GitHub pull request when running on Azure Pipelines.
- ansible-test - Skip installing requirements if they are already installed.
- ansible-test - add constraint for ``cffi`` to prevent failure on systems with older versions of ``gcc`` (https://foss.heptapod.net/pypy/cffi/-/issues/480)

- ansible-test - convert target paths to unicode on Python 2 to avoid ``UnicodeDecodeError`` (ansible/ansible#68398, ansible/ansible#72623).
- ansible-test - improve classification of changes to ``.gitignore``, ``COPYING``, ``LICENSE``, ``Makefile``, and all files ending with one of ``.in`, ``.md`, ``.rst``, ``.toml``, ``.txt`` in the collection root directory (ansible/ansible#72353).
- ansible-test now uses GNU tar format instead of the Python default when creating payloads for remote systems
- azure_rm inventory plugin - update to fetch availability zone information of VM in hostvars. (ansible-collections/azure#161)
- dnf - fix filtering to avoid dependncy conflicts (ansible/ansible#72316)
- ec2_group - Fixes error handling during tagging failures (ansible-collections/amazon.aws#210).
- ensure 'local' connection always has the correct default user for actions to consume.
- network_cli - Update paramiko play_context when network_cli's play context is updated so that ssh parameters can be updated as well.
- network_cli connection plugin - Perform privilege escalation before setting terminal.
- pause - Fix indefinite hang when using a pause task on a background process (ansible/ansible#32142)

- remove redundant remote_user setting in play_context for local as plugin already does it, also removes fork/thread issue from use of pwd library.
- set_mode_if_different - handle symlink if it is inside a directory with sticky bit set (ansible/ansible#45198)

- systemd - account for templated unit files using ``@`` when searching for the unit file (ansible/ansible#72347 (comment))

- systemd - follow up fix to ansible/ansible#72338 to use ``list-unit-files`` rather than ``list-units`` in order to show all units files on the system.

- systemd - work around bug with ``systemd`` 245 and 5.8 kernel that does not correctly report service state (ansible/ansible#71528)

- wait_for - catch and ignore errors when getting active connections with psutil (ansible/ansible#72322)

v2.9.15
=======

Release Summary
---------------

| Release Date: 2020-11-02
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-test - Add a ``--docker-network`` option to choose the network for running containers when using the ``--docker`` option.
- ansible-test - Collections can now specify pip constraints for unit and integration test requirements using ``tests/unit/constraints.txt`` and ``tests/integration/constraints.txt`` respectively.
- dnf - now shows specific package changes (installations/removals) under ``results`` in check_mode. (ansible/ansible#66132)
- module_defaults - add new module s3_metrics_configuration from community.aws to aws module_defaults group (ansible/ansible#72145).
- vmware_guest_custom_attributes - Fixed issue when trying to set a VM custom attribute when there are custom attributes with the same name for other object types (ansible-collections/community.vmware#412).

Breaking Changes / Porting Guide
--------------------------------

- ansible-galaxy login command has been removed (see ansible/ansible#71560)

Bugfixes
--------

- Restore the ability for changed_when/failed_when to function with group_by.
- ansible-test - Always connect additional Docker containers to the network used by the current container (if any).
- ansible-test - Always map ``/var/run/docker.sock`` into test containers created by the ``--docker`` option if the docker host is not ``localhost``.
- ansible-test - Attempt to detect the Docker hostname instead of assuming ``localhost``.
- ansible-test - Correctly detect running in a Docker container on Azure Pipelines.
- ansible-test - Prefer container IP at ``.NetworkSettings.Networks.{NetworkName}.IPAddress`` over ``.NetworkSettings.IPAddress``.
- ansible-test - The ``cs`` and ``openshift`` test plugins now search for containers on the current network instead of assuming the ``bridge`` network.
- ansible-test - Using the ``--remote`` option on Azure Pipelines now works from a job running in a container.
- ansible-test - disable ansible-doc sanity test for vars plugins in collections, which are not supported by Ansible 2.9 (ansible/ansible#72336).
- async_wrapper - Fix race condition when ``~/.ansible_async`` folder tries to be created by multiple async tasks at the same time - ansible/ansible#59306
- dnf - it is now possible to specify both ``security: true`` and ``bugfix: true`` to install updates of both types. Previously, only security would get installed if both were true. (ansible/ansible#70854)
- facts - fix distribution fact for SLES4SAP (ansible/ansible#71559).
- kubectl - follow up fix in _build_exec_cmd API (ansible/ansible#72171).
- nmcli - typecast parameters to string as required (ansible/ansible#59095).
- ovirt_disk - don't move disk when already in storage_domain (oVirt/ovirt-ansible-collection#135).
- postgresql_pg_hba - fix a crash when a new rule with an 'options' field replaces a rule without or vice versa (ansible-collections/community.general#1108).
- postgresql_privs - fix the module mistakes a procedure for a function (ansible-collections/community.general#994)
- powershell - remove getting the PowerShell version from the env var ``POWERSHELL_VERSION``. This feature never worked properly and can cause conflicts with other libraries that use this var
- user - AnsibleModule.run_command returns a tuple of return code, stdout and stderr. The module main function of the user module expects user.create_user to return a tuple of return code, stdout and stderr. Fix the locations where stdout and stderr got reversed.

- user - Local users with an expiry date cannot be created as the ``luseradd`` / ``lusermod`` commands do not support the ``-e`` option. Set the expiry time in this case via ``lchage`` after the user was created / modified. (ansible/ansible#71942)

- zfs - fixed ``invalid character '@' in pool name"`` error when working with snapshots on a root zvol (ansible-collections/community.general#932).

v2.9.14
=======

Release Summary
---------------

| Release Date: 2020-10-05
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__


Minor Changes
-------------

- ansible-test - Added CI provider support for Azure Pipelines.
- ansible-test - Added support for Ansible Core CI request signing for Shippable.
- ansible-test - Allow custom ``--remote-stage`` options for development and testing.
- ansible-test - Fix ``ansible-test coverage`` reporting sub-commands (``report``, ``html``, ``xml``) on Python 2.6.
- ansible-test - Refactored CI related logic into a basic provider abstraction.
- ansible-test - Remove the discontinued ``us-east-2`` choice from the ``--remote-aws-region`` option.
- ansible-test - Request remote resources by provider name for all provider types.
- ansible-test - Show a warning when the obsolete ``--remote-aws-region`` option is used.
- ansible-test - Support custom remote endpoints with the ``--remote-endpoint`` option.
- ansible-test - Update built-in service endpoints for the ``--remote`` option.
- ansible-test - Use new endpoint for Parallels based instances with the ``--remote`` option.
- vmware_guest - Support HW version 15 / vSphere 6.7U2 (ansible-collections/community.vmware#99).

Security Fixes
--------------

- kubectl - connection plugin now redact kubectl_token and kubectl_password in console log (ansible-collections/community.kubernetes#65) (CVE-2020-1753).

Bugfixes
--------

- Handle write_files option in cgroup_perf_recap callback plugin (ansible/ansible#64936).
- Prevent templating unused variables for {% include %} (ansible/ansible#68699)
- Provide more information in AnsibleUndefinedVariable (ansible/ansible#55152)
- ansible-doc - do not crash if plugin name cannot be found (ansible/ansible#71965).
- ansible-doc - properly show plugin name when ``name:`` is used instead of ``<plugin_type>:`` (ansible/ansible#71965).
- ansible-test - Change classification using ``--changed`` now consistently handles common configuration files for supported CI providers.
- ansible-test - The ``resource_prefix`` variable provided to tests running on Azure Pipelines is now converted to lowercase to match other CI providers.
- ansible-test - for local change detection, allow to specify branch to compare to with ``--base-branch`` for all types of tests (ansible/ansible#69508).
- docker_login - now correctly reports changed status on logout for Docker versions released after June 2020.
- docker_login - now obeys check_mode for logout
- interfaces_file - escape regular expression characters in old value (ansible-collections/community.general#777).
- ovirt_disk - fix upload when direct upload fails (oVirt/ovirt-ansible-collection#120).
- postgres_user - remove false positive ``no_log`` warning for ``no_password_changes`` option (ansible/ansible#68106).
- psrp - Fix hang when copying an empty file to the remote target
- runas - create a new token when running as ``SYSTEM`` to ensure it has the full privileges assigned to that account
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

Successfully merging a pull request may close this issue.

2 participants