From: Zack Cerza Date: Thu, 10 Aug 2017 18:22:24 +0000 (-0700) Subject: Use the synchronize module to ship collectors X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df1791f32affb7240e8df655110d75f82cff613a;p=cephmetrics.git Use the synchronize module to ship collectors This prevents things like .pyc files from being deployed. Signed-off-by: Zack Cerza --- 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