If you planning to use Ansible to Disable the web console message from Cockpit on Rocky Linux 8.5, it is very easy to write on Ansible,
- name: Remove /etc/motd.d/cockpit
file:
path: /etc/motd.d/cockpit
state: absent
when: ansible_os_family == "RedHat"