From 170439d977348cf0aa608cc993607b56d43dd182 Mon Sep 17 00:00:00 2001 From: Sebastian Haderecker Date: Mon, 28 Oct 2019 11:49:57 +0000 Subject: [PATCH] Tweak hpfeeds setup - Fix owner and file permissions for proper comparison - Only execute the hpfeeds script when the config file has changed --- .../openstack/roles/custom_hpfeeds/tasks/main.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cloud/ansible/openstack/roles/custom_hpfeeds/tasks/main.yaml b/cloud/ansible/openstack/roles/custom_hpfeeds/tasks/main.yaml index e54b093d..4c5a2c0e 100644 --- a/cloud/ansible/openstack/roles/custom_hpfeeds/tasks/main.yaml +++ b/cloud/ansible/openstack/roles/custom_hpfeeds/tasks/main.yaml @@ -2,9 +2,11 @@ copy: src: ../files/hpfeeds.cfg dest: /data/ews/conf - owner: root - group: root - mode: 0644 + owner: tpot + group: tpot + mode: 0770 + register: config - name: Applying hpfeeds settings command: /opt/tpot/bin/hpfeeds_optin.sh --conf=/data/ews/conf/hpfeeds.cfg + when: config.changed == true