Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
The issue is only reproducible if executing the playbook with `-v`, and it would not break the script. The data is correctly retrieved from the vault.
There is an upstream PR to fix the issue: https://github.com/freeipa/ansible-freeipa/pull/385
Verified
ansible-freeipa-0.3.1-1.el8.noarch
ansible_freeipa_tests/vault_module.py::TestStandardVault::test_standard_vault_with_retrieved_datafile
2020-12-11T07:59:57+0000 -------------------------------- live log call ---------------------------------
2020-12-11T07:59:57+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['/usr/bin/rpm', '-q', 'ansible-freeipa']
2020-12-11T07:59:57+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:59:57+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['cat', 'vault_retrieved_data_file.txt']
2020-12-11T07:59:57+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/vault.hosts
2020-12-11T07:59:58+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT vault_module.yml
2020-12-11T07:59:58+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/vault.hosts', 'vault_module.yml']
2020-12-11T08:00:05+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T08:00:05+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['cat', 'vault_retrieved_data_file.txt']
2020-12-11T08:00:05+0000 PASSED
Based on the test result, marking the bug VERIFIED.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (ansible-freeipa bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2021:1860
Description of problem: Printing strange characters while retrieving data to file in the vault module. Version-Release number of selected component (if applicable): ansible-freeipa-0.1.12-6.el8.noarch How reproducible: --- - name: Test vault hosts: ipaserver tasks: - name: vault module testing ipavault: ipaadmin_password: <xxxxxxxxxxx> name: 24stdvault out: "{{ ansible_env.HOME }}/vault_ret_data_file.txt" state: retrieved ansible-playbook 2.9.12 config file = /root/ansible.cfg configured module search path = ['/root/ansible-freeipa/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.6/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 3.6.8 (default, Aug 18 2020, 08:33:21) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] Using /root/ansible.cfg as config file PLAYBOOK: ret.yaml *************************************************************************************************** 1 plays in ret.yaml PLAY [Test vault] **************************************************************************************************** TASK [Gathering Facts] *********************************************************************************************** task path: /root/ret.yaml:2 ok: [master.ipadomain.test] META: ran handlers TASK [vault module testing] ****************************************************************************************** task path: /root/ret.yaml:6 ok: [master.ipadomain.test] => {"changed": false, "vault": {"data": "��\u0017��\u00106Q�܃\u0012A\t��*�\u001eGq��\u0015\"B\\~��~Nq��\u0015W�HCA�\u0014;����\u0005��\n�"}} META: ran handlers META: ran handlers PLAY RECAP *********************************************************************************************************** master.ipadomain.test Actual results: task path: /root/ret.yaml:6 ok: [master.ipadomain.test] => {"changed": false, "vault": {"data": "��\u0017��\u00106Q�܃\u0012A\t��*�\u001eGq��\u0015\"B\\~��~Nq��\u0015W�HCA�\u0014;����\u0005��\n�"}} [root@master ~]# cat vault_ret_data_file.txt Vault_data_stored_in_file