Skip to content

Instantly share code, notes, and snippets.

@jserviceorg
Last active December 7, 2018 11:45
Show Gist options
  • Save jserviceorg/48905c3d24fa93469ff5b8c28bfeb32f to your computer and use it in GitHub Desktop.
Save jserviceorg/48905c3d24fa93469ff5b8c28bfeb32f to your computer and use it in GitHub Desktop.
create rsnapshot hostlist for rsnapshot
---
- hosts: backup
tasks:
- name: generate hostlist root backup for rsnapshot
lineinfile: "dest=/opt/rsnapshot/rsnapshot.conf
line='{{ item }} / {{ item }}/'
state=present"
with_items:
- "{{ groups['all'] }}"
- name: generate hostlist root backup for rsnapshot
lineinfile: "dest=/opt/rsnapshot/rsnapshot.conf
line='{{ item }} /data {{ item }}/data'
state=present"
with_items:
- "{{ groups['all'] }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment