sqlite3.Row not working in module

77 views
Skip to first unread message

Joe Gainey

unread,
Feb 10, 2022, 10:04:49 PM2/10/22
to Ansible Development
I have a very simple module to query sqlite database.  it works except that the sqlite3.Row does not seem to be functional.

if anyone has run into similar issues please let me know
I'm using python 3.6.8, ansible 4.9.0
<pre>
PLAY [community.sqlite3 test playbook] ******************************************************************************************************************************************************************************************************

TASK [Test that my module works] ************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [debug] ********************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": {
        "changed": false,
        "failed": false,
        "interpreter_version": "3.6.8 (default, Aug 13 2020, 07:46:32) \n[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]",
        "query_results": [
            [
                "152258fe-691b-4693-b768-2b1be1a30b96",
                "virtual_server",
                "virtual host running an os"
            ],
            [
                "74183615-c732-455a-a1a1-591f2e940c9f",
                "physical_server",
                "physical host running an os"
            ]
        ]
    }
}

PLAY RECAP **********************************************************************************************************************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
</pre>
sqlite3_query.py

Joe Gainey

unread,
Feb 10, 2022, 10:10:10 PM2/10/22
to Ansible Development
attached is a sample playbook if anyone wants to try it.
play.yml
Reply all
Reply to author
Forward
0 new messages