Bug 2203747

Summary: Running cephadm-distribute-ssh-key.yml will require ansible.posix collection package downstream
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Aditya Ramteke <aramteke>
Component: BuildAssignee: Ken Dreyer (Red Hat) <kdreyer>
Status: CLOSED ERRATA QA Contact: Aditya Ramteke <aramteke>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1CC: cephqe-warriors, vdas
Target Milestone: ---   
Target Release: 6.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cephadm-ansible-2.15.0-1.el9cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-15 09:17:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2127116    

Description Aditya Ramteke 2023-05-15 07:26:32 UTC
Description of problem:

ansible-playbook -i hosts cephadm-distribute-ssh-key.yml -e cephadm_ssh_user=cephuser -e admin_node=ceph-custom-images-g9kr1f-node1-installer
[DEPRECATION WARNING]: [defaults]callback_whitelist option, normalizing names to new standard, use callbacks_enabled 
instead. This feature will be removed from ansible-core in version 2.15. Deprecation warnings can be disabled by 
setting deprecation_warnings=False in ansible.cfg.
ERROR! couldn't resolve module/action 'authorized_key'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/usr/share/cephadm-ansible/cephadm-distribute-ssh-key.yml': line 64, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


    - name: allow ssh public key for {{ cephadm_ssh_user | default('root') }} account
      ^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:

    with_items:
      - {{ foo }}

Should be written as:

    with_items:
      - "{{ foo }}"



Running cephadm-distribute-ssh-key.yml will require ansible.posix collection package downstream.

Version-Release number of selected component (if applicable):


How reproducible:
Always


Actual results:
Playbook is falling with following error. 
    with_items:
      - {{ foo }}

Expected results:
Playbook should successfully.

Comment 7 errata-xmlrpc 2023-06-15 09:17:24 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 (Moderate: Red Hat Ceph Storage 6.1 security and bug fix 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/RHSA-2023:3623