Files
operating-automation/roles/manage-ssh-keys/handlers/main.yml
Ansible Servercow a2913d8fd7 fix? Handler
2024-11-21 16:09:17 +01:00

16 lines
452 B
YAML

---
- name: Cleanup and add timestamp
tasks:
- name: Kommentare aus der Datei entfernen
lineinfile:
path: "{{ authorized_keys_file }}"
state: absent
regexp: '^#.*$'
- name: Kommentar hinzufügen (Modified by Ansible)
blockinfile:
path: "{{ authorized_keys_file }}"
marker: ""
block: |
# Modified by Ansible on {{ ansible_date_time.date }} at {{ ansible_date_time.time }}