Files
ansible-playbooks/roles/manage-ssh-keys/handlers/main.yml
2024-11-22 20:33:29 +01:00

13 lines
336 B
YAML

---
- name: Cleanup Comments
lineinfile:
path: "{{ authorized_keys_file }}"
state: absent
regexp: '^#.*$'
- name: Add Comment
blockinfile:
path: "{{ authorized_keys_file }}"
marker: ""
block: |
# Modified by Ansible on {{ ansible_date_time.date }} at {{ ansible_date_time.time }}