Add a rsyncd role. For now just to sync logs to log02, but can be extended to download later.
This commit is contained in:
parent
6e0c36316b
commit
7316ef1ca3
5 changed files with 72 additions and 1 deletions
38
roles/rsyncd/tasks/main.yml
Normal file
38
roles/rsyncd/tasks/main.yml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue