create config dir, copy dir contents, ansible marks must be comments
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
loop:
|
loop:
|
||||||
- "/opt/backup"
|
- "/opt/backup"
|
||||||
- "/opt/backup/bin"
|
- "/opt/backup/bin"
|
||||||
|
- "/opt/backup/config"
|
||||||
|
|
||||||
- name: backup | system setup | create a link to backup script
|
- name: backup | system setup | create a link to backup script
|
||||||
file:
|
file:
|
||||||
@@ -14,14 +15,14 @@
|
|||||||
|
|
||||||
- name: backup | system setup | copy backup config files
|
- name: backup | system setup | copy backup config files
|
||||||
copy:
|
copy:
|
||||||
dest: "/opt/backup/config"
|
dest: "/opt/backup/config/"
|
||||||
src: "config"
|
src: "config/"
|
||||||
|
|
||||||
- name: backup | system setup | add entries to ssh_config
|
- name: backup | system setup | add entries to ssh_config
|
||||||
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"
|
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user