Add a rsyncd role. For now just to sync logs to log02, but can be extended to download later.

This commit is contained in:
Kevin Fenzi 2014-03-17 15:55:26 +00:00
parent 6e0c36316b
commit 7316ef1ca3
5 changed files with 72 additions and 1 deletions

View file

@ -0,0 +1,38 @@
---
#
# This role sets up rsyncd on a server
#
- name: install rsync
yum: state=installed name=rsync
tags:
- packages
- name: rsyncd.conf file
copy: src={{ item }} dest=/etc/rsyncd.conf mode=644
with_first_found:
- "{{ rsyncd.conf }}"
- rsyncd.conf.{{ ansible_fqdn }}
- rsyncd.conf.{{ host_group }}
- rsyncd.conf.default
notify:
- restart xinetd
tags:
- config
- name: xinetd rsync file
copy: src={{ item }} dest=/etc/xinetd.d/rsync mode=644
with_first_found:
- "{{ rsync }}"
- rsync.{{ ansible_fqdn }}
- rsync.{{ host_group }}
- rsync.default
notify:
- restart xinetd
tags:
- config
- name: make sure rsync is enabled in xinetd
service: name=rsync state=started
tags:
- services