added block markers so that the tasks do not overwrite

This commit is contained in:
2022-11-22 18:25:32 +01:00
parent 3c28b3d6be
commit f199c30873
2 changed files with 2 additions and 0 deletions

View File

@@ -21,6 +21,7 @@
blockinfile: blockinfile:
dest: "/{{ ansible_user_id }}/.ssh/config" dest: "/{{ ansible_user_id }}/.ssh/config"
block: "{{ lookup('template', 'ssh_config.j2') }}" block: "{{ lookup('template', 'ssh_config.j2') }}"
marker: "{mark} ANSIBLE MANAGED BLOCK FOR backup"
# template: # template:
# src: "ssh_config.j2" # src: "ssh_config.j2"
# dest: "{{ ansible_user_id }}/.ssh/config" # dest: "{{ ansible_user_id }}/.ssh/config"

View File

@@ -51,6 +51,7 @@
backup: True backup: True
owner: '{{ user }}' owner: '{{ user }}'
group: '{{ user }}' group: '{{ user }}'
marker: "{mark} Basic ANSIBLE MANAGED BLOCK"
- name: users | {{ user }} | clone remote repos - name: users | {{ user }} | clone remote repos
become: yes become: yes