From 3f7298ce8d91d5ce89936325016c9ab7698ec93e Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Tue, 27 Jun 2017 13:39:17 +0000 Subject: [PATCH] ok we use a template for the download servers and not for the rest --- roles/rsyncd/tasks/main.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/roles/rsyncd/tasks/main.yml b/roles/rsyncd/tasks/main.yml index 145f9d4406..56d16fd4d4 100644 --- a/roles/rsyncd/tasks/main.yml +++ b/roles/rsyncd/tasks/main.yml @@ -25,24 +25,26 @@ - rsyncd when: ansible_distribution_major_version|int > 21 -# - name: rsyncd.conf file -# copy: src={{ item }} dest=/etc/rsyncd.conf mode=0644 -# with_first_found: -# - "{{ rsyncd_conf }}" -# - rsyncd.conf.{{ inventory_hostname }} -# - rsyncd.conf.{{ host_group }} -# - rsyncd.conf.{{ rsync_group }} -# - rsyncd.conf.default -# notify: -# - restart xinetd -# tags: -# - config -# - rsyncd +- name: rsyncd.conf file + copy: src={{ item }} dest=/etc/rsyncd.conf mode=0644 + with_first_found: + - "{{ rsyncd_conf }}" + - rsyncd.conf.{{ inventory_hostname }} + - rsyncd.conf.{{ host_group }} + - rsyncd.conf.{{ rsync_group }} + - rsyncd.conf.default + when: "'download' not in group_names" + notify: + - restart xinetd + tags: + - config + - rsyncd - name: rsyncd.conf file template: src=rsyncd.conf.download.j2 dest=/etc/rsyncd.conf mode=0644 notify: - restart xinetd + when: "'download' in group_names" tags: - config - rsyncd