mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-06-14 22:36:09 +08:00
51 lines
1.0 KiB
YAML
51 lines
1.0 KiB
YAML
---
|
|
#
|
|
# This role sets up rsyncd on a server
|
|
#
|
|
|
|
- name: install rnecessary packages
|
|
yum: state=installed name={{item}}
|
|
with_items:
|
|
- rsync
|
|
- xinetd
|
|
- libsemanage-python
|
|
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.{{ rsync_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.{{ rsync_group }}
|
|
- rsync.default
|
|
notify:
|
|
- restart xinetd
|
|
tags:
|
|
- config
|
|
|
|
- name: make sure xinetd is started
|
|
service: name=xinetd state=started
|
|
tags:
|
|
- services
|
|
|
|
- name: set sebooleans so rsync can read dirs
|
|
action: seboolean name=rsync_export_all_ro
|
|
state=true
|
|
persistent=true
|
|
|