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.
Bug 1828043 - [ansible-freeipa] By default salt added with the standard vault in vault module
Summary: [ansible-freeipa] By default salt added with the standard vault in vault module
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ansible-freeipa
Version: 8.3
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Rafael Jeffman
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-26 12:28 UTC by Varun Mylaraiah
Modified: 2020-11-04 02:47 UTC (History)
2 users (show)

Fixed In Version: ansible-freeipa-0.1.11-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:46:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:4663 0 None None None 2020-11-04 02:46:46 UTC

Description Varun Mylaraiah 2020-04-26 12:28:25 UTC
Description of problem:
While adding a standard vault, salt also added by default in ansible-freeipa Vault module.

Version-Release number of selected component (if applicable):
ansible-freeipa-0.1.9-1.fc31.noarch


Steps to Reproduce:
[root@ansible ~]# cat stdvault3.yaml
---
- name: Test vault
  hosts: ipaserver

  tasks:
  - name: vault module testing
    ipavault:
      Ipaadmin_password: <xxxxxxxxxxx>
      name: stdvault3
      vault_type: standard
      username: vault_user3


[root@ansible ~]# ansible-playbook -vv -i inventory/server.hosts stdvault3.yaml 
ansible-playbook 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.7.6 (default, Jan 30 2020, 09:44:41) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
Using /etc/ansible/ansible.cfg as config file

PLAYBOOK: stdvault3.yaml ********************************************************************************************************************************************************************************************
1 plays in stdvault3.yaml

PLAY [Test vault] ***************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
task path: /root/stdvault3.yaml:2
[DEPRECATION WARNING]: Distribution fedora 31 on host master.ipadomain.test should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible 
release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will be 
removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [master.ipadomain.test]
META: ran handlers

TASK [vault module testing] *****************************************************************************************************************************************************************************************
task path: /root/stdvault3.yaml:6
ok: [master.ipadomain.test] => {"changed": false}
META: ran handlers
META: ran handlers

PLAY RECAP **********************************************************************************************************************************************************************************************************
master.ipadomain.test      : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

Actual results:
Salt added with standard vault.
[root@master ~]# ipa vault-show stdvault3 --user=vault_user3
  Vault name: stdvault3
  Type: standard
  Salt: obvD8R1KF9uDD3k/CJOR2riTIeYbFNM7ePj49nI6OIM=
  Owner users: admin
  Vault user: vault_user3


Expected results:
Salt should not add with the standard vault.

Comment 1 Rafael Jeffman 2020-05-07 03:08:10 UTC
Proposed fix on upstream PR: https://github.com/freeipa/ansible-freeipa/pull/263

Comment 3 Rafael Jeffman 2020-06-05 19:30:08 UTC
Upstream PR was merged.

Comment 6 Varun Mylaraiah 2020-07-28 03:44:24 UTC
Verified

ansible-freeipa-0.1.12-5.el8.noarch

Automation test result:

ansible-freeipa-tests/ansible_freeipa_tests/vault_module.py::TestStandardVault::()::test_standard_vault_add
------------------------------ Captured log call -------------------------------
channel.py                1212 DEBUG    [chan 4] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 4] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 4 opened.
transport.py               318 INFO     RUN ['ipactl', 'status']
transport.py               519 DEBUG    RUN ['ipactl', 'status']
channel.py                1212 DEBUG    [chan 4] Sesch channel 4 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    Directory Service: RUNNING
transport.py               563 DEBUG    krb5kdc Service: RUNNING
transport.py               563 DEBUG    kadmin Service: RUNNING
transport.py               563 DEBUG    ipa: INFO: The ipactl command was successful
transport.py               563 DEBUG    named Service: RUNNING
transport.py               563 DEBUG    httpd Service: RUNNING
transport.py               563 DEBUG    ipa-custodia Service: RUNNING
transport.py               563 DEBUG    pki-tomcatd Service: RUNNING
transport.py               563 DEBUG    ipa-otpd Service: RUNNING
transport.py               563 DEBUG    ipa-dnskeysyncd Service: RUNNING
channel.py                1212 DEBUG    [chan 4] EOF received (4)
channel.py                1212 DEBUG    [chan 4] EOF sent (4)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 5] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 5] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 5 opened.
transport.py               318 INFO     RUN ['kinit', 'admin']
transport.py               519 DEBUG    RUN ['kinit', 'admin']
channel.py                1212 DEBUG    [chan 5] Sesch channel 5 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    Password for admin: 
channel.py                1212 DEBUG    [chan 5] EOF received (5)
channel.py                1212 DEBUG    [chan 5] EOF sent (5)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 6] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 6] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 6 opened.
transport.py               318 INFO     RUN ['ipa', 'vault-find']
transport.py               519 DEBUG    RUN ['ipa', 'vault-find']
channel.py                1212 DEBUG    [chan 6] Sesch channel 6 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    ----------------
transport.py               563 DEBUG    0 vaults matched
transport.py               563 DEBUG    ----------------
transport.py               563 DEBUG    ----------------------------
transport.py               563 DEBUG    Number of entries returned 0
transport.py               563 DEBUG    ----------------------------
channel.py                1212 DEBUG    [chan 6] EOF received (6)
channel.py                1212 DEBUG    [chan 6] EOF sent (6)
transport.py               217 DEBUG    Exit code: 1
channel.py                1212 DEBUG    [chan 7] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 7] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 7 opened.
transport.py               318 INFO     RUN ['kdestroy', '-A']
transport.py               519 DEBUG    RUN ['kdestroy', '-A']
channel.py                1212 DEBUG    [chan 7] Sesch channel 7 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
channel.py                1212 DEBUG    [chan 7] EOF received (7)
channel.py                1212 DEBUG    [chan 7] EOF sent (7)
transport.py               217 DEBUG    Exit code: 0
transport.py               293 INFO     WRITE inventory/vault.hosts
sftp.py                    158 DEBUG    [chan 0] open(b'inventory/vault.hosts', 'wb')
sftp.py                    158 DEBUG    [chan 0] open(b'inventory/vault.hosts', 'wb') -> 00000000
sftp.py                    158 DEBUG    [chan 0] close(00000000)
transport.py               329 INFO     PUT vault_module.yml
sftp.py                    158 DEBUG    [chan 0] open(b'vault_module.yml', 'wb')
sftp.py                    158 DEBUG    [chan 0] open(b'vault_module.yml', 'wb') -> 00000000
sftp.py                    158 DEBUG    [chan 0] close(00000000)
sftp.py                    158 DEBUG    [chan 0] stat(b'vault_module.yml')
channel.py                1212 DEBUG    [chan 4] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 4] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 4 opened.
transport.py               318 INFO     RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/vault.hosts', 'vault_module.yml']
transport.py               519 DEBUG    RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/vault.hosts', 'vault_module.yml']
channel.py                1212 DEBUG    [chan 4] Sesch channel 4 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    ansible-playbook 2.9.11
transport.py               563 DEBUG      config file = /root/ansible.cfg
transport.py               563 DEBUG      configured module search path = ['/root/ansible-freeipa/plugins/modules', '/usr/share/ansible/plugins/modules']
transport.py               563 DEBUG      ansible python module location = /usr/lib/python3.6/site-packages/ansible
transport.py               563 DEBUG      executable location = /usr/bin/ansible-playbook
transport.py               563 DEBUG      python version = 3.6.8 (default, Jun 26 2020, 12:10:09) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
transport.py               563 DEBUG    Using /root/ansible.cfg as config file
transport.py               563 DEBUG    
transport.py               563 DEBUG    PLAYBOOK: vault_module.yml *****************************************************
transport.py               563 DEBUG    1 plays in vault_module.yml
transport.py               563 DEBUG    
transport.py               563 DEBUG    PLAY [Playbook to ensure the standard vault is present with description and also verify salt is not present with standard vault.] ***
transport.py               563 DEBUG    
transport.py               563 DEBUG    TASK [Gathering Facts] *********************************************************
transport.py               563 DEBUG    task path: /root/vault_module.yml:2
transport.py               563 DEBUG    ok: [master.ipadomain.test]
transport.py               563 DEBUG    META: ran handlers
transport.py               563 DEBUG    
transport.py               563 DEBUG    TASK [ipavault] ****************************************************************
transport.py               563 DEBUG    task path: /root/vault_module.yml:6
transport.py               563 DEBUG    changed: [master.ipadomain.test] => {"changed": true}
transport.py               563 DEBUG    META: ran handlers
transport.py               563 DEBUG    META: ran handlers
transport.py               563 DEBUG    
transport.py               563 DEBUG    PLAY RECAP *********************************************************************
transport.py               563 DEBUG    master.ipadomain.test      : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
transport.py               563 DEBUG    
channel.py                1212 DEBUG    [chan 4] EOF received (4)
channel.py                1212 DEBUG    [chan 4] EOF sent (4)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 8] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 8] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 8 opened.
transport.py               318 INFO     RUN ['kinit', 'admin']
transport.py               519 DEBUG    RUN ['kinit', 'admin']
channel.py                1212 DEBUG    [chan 8] Sesch channel 8 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    Password for admin: 
channel.py                1212 DEBUG    [chan 8] EOF received (8)
channel.py                1212 DEBUG    [chan 8] EOF sent (8)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 9] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 9] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 9 opened.
transport.py               318 INFO     RUN ['ipa', 'vault-find']
transport.py               519 DEBUG    RUN ['ipa', 'vault-find']
channel.py                1212 DEBUG    [chan 9] Sesch channel 9 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    ---------------
transport.py               563 DEBUG    1 vault matched
transport.py               563 DEBUG    ---------------
transport.py               563 DEBUG      Vault name: 01stdvault
transport.py               563 DEBUG      Description: std_vault
transport.py               563 DEBUG      Type: standard
transport.py               563 DEBUG      Vault user: admin
transport.py               563 DEBUG    ----------------------------
transport.py               563 DEBUG    Number of entries returned 1
transport.py               563 DEBUG    ----------------------------
channel.py                1212 DEBUG    [chan 9] EOF received (9)
channel.py                1212 DEBUG    [chan 9] EOF sent (9)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 10] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 10] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 10 opened.
transport.py               318 INFO     RUN ['kdestroy', '-A']
transport.py               519 DEBUG    RUN ['kdestroy', '-A']
channel.py                1212 DEBUG    [chan 10] Sesch channel 10 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
channel.py                1212 DEBUG    [chan 10] EOF received (10)
channel.py                1212 DEBUG    [chan 10] EOF sent (10)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 11] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 11] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 11 opened.
transport.py               318 INFO     RUN ['kinit', 'admin']
transport.py               519 DEBUG    RUN ['kinit', 'admin']
channel.py                1212 DEBUG    [chan 11] Sesch channel 11 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    Password for admin: 
channel.py                1212 DEBUG    [chan 11] EOF received (11)
channel.py                1212 DEBUG    [chan 11] EOF sent (11)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 12] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 12] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 12 opened.
transport.py               318 INFO     RUN ['ipa', 'vault-find', '01stdvault']
transport.py               519 DEBUG    RUN ['ipa', 'vault-find', '01stdvault']
channel.py                1212 DEBUG    [chan 12] Sesch channel 12 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    ---------------
transport.py               563 DEBUG    1 vault matched
transport.py               563 DEBUG    ---------------
transport.py               563 DEBUG      Vault name: 01stdvault
transport.py               563 DEBUG      Description: std_vault
transport.py               563 DEBUG      Type: standard
transport.py               563 DEBUG      Vault user: admin
transport.py               563 DEBUG    ----------------------------
transport.py               563 DEBUG    Number of entries returned 1
transport.py               563 DEBUG    ----------------------------
channel.py                1212 DEBUG    [chan 12] EOF received (12)
channel.py                1212 DEBUG    [chan 12] EOF sent (12)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 13] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 13] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 13 opened.
transport.py               318 INFO     RUN ['kdestroy', '-A']
transport.py               519 DEBUG    RUN ['kdestroy', '-A']
channel.py                1212 DEBUG    [chan 13] Sesch channel 13 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
channel.py                1212 DEBUG    [chan 13] EOF received (13)
channel.py                1212 DEBUG    [chan 13] EOF sent (13)
transport.py               217 DEBUG    Exit code: 0

Comment 9 errata-xmlrpc 2020-11-04 02:46:35 UTC
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-2020:4663


Note You need to log in before you can comment on or make changes to this bug.