From df1791f32affb7240e8df655110d75f82cff613a Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 10 Aug 2017 11:22:24 -0700 Subject: [PATCH] Use the synchronize module to ship collectors This prevents things like .pyc files from being deployed. Signed-off-by: Zack Cerza --- .../ceph-collectd/tasks/install_collectd_plugins.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ansible/roles/ceph-collectd/tasks/install_collectd_plugins.yml b/ansible/roles/ceph-collectd/tasks/install_collectd_plugins.yml index ba0fff8..214f46b 100644 --- a/ansible/roles/ceph-collectd/tasks/install_collectd_plugins.yml +++ b/ansible/roles/ceph-collectd/tasks/install_collectd_plugins.yml @@ -13,12 +13,16 @@ state: absent with_items: - "{{ collectd_dir }}/cephmetrics" - - "{{ collectors_dir }}/collectors" - name: Ship collectors - copy: + synchronize: src: files/cephmetrics_collectors/ dest: "{{ collectors_dir }}" + delete: yes + rsync_opts: + - "--exclude=*.pyc" + - "--exclude=__pycache__" + - "--delete-excluded" notify: Restart collectd - name: Ship collectd plugin -- 2.47.3