create config dir, copy dir contents, ansible marks must be comments

This commit is contained in:
2022-11-23 09:53:14 +01:00
parent 745ec3b2e5
commit 9c7f7dcfe4

View File

@@ -5,6 +5,7 @@
loop:
- "/opt/backup"
- "/opt/backup/bin"
- "/opt/backup/config"
- name: backup | system setup | create a link to backup script
file:
@@ -14,14 +15,14 @@
- name: backup | system setup | copy backup config files
copy:
dest: "/opt/backup/config"
src: "config"
dest: "/opt/backup/config/"
src: "config/"
- name: backup | system setup | add entries to ssh_config
blockinfile:
dest: "/{{ ansible_user_id }}/.ssh/config"
block: "{{ lookup('template', 'ssh_config.j2') }}"
marker: "{mark} ANSIBLE MANAGED BLOCK FOR backup"
marker: "## {mark} ANSIBLE MANAGED BLOCK FOR backup"
# template:
# src: "ssh_config.j2"
# dest: "{{ ansible_user_id }}/.ssh/config"