--- - name: Remove motd from oam stack pamd: name: "{{ item.name }}" type: "{{ item.type }}" control: "{{ item.control }}" module_path: "{{ item.path }}" state: absent loop: - { name: 'login', type: 'session', control: 'optional', path: 'pam_motd.so' } - { name: 'sshd', type: 'session', control: 'optional', path: 'pam_motd.so' } become: True become_user: root when: not pve_pamd_motd_enabled | bool