]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
pulpito: Restart if the config changes 146/head
authorZack Cerza <zack@redhat.com>
Thu, 1 Oct 2015 16:53:40 +0000 (10:53 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 1 Oct 2015 22:40:23 +0000 (16:40 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
roles/pulpito/tasks/main.yml

index 8590eff685c03368c89f4930a33613dfa3876ccf..5376b1c7319dc7cadc37158cb3615dc98669a756 100644 (file)
@@ -63,7 +63,7 @@
     dest: "{{ pulpito_repo_path }}/prod.py"
     regexp: "^paddles_address = "
     line: "paddles_address = '{{ paddles_address|mandatory }}'"
-  when: pulpito_config.stat.exists == false
+  register: pulpito_config
 
 - name: Enable supervisord
   service:
 - name: Check if pulpito is running
   command: supervisorctl status pulpito
   register: pulpito_status
+  changed_when: false
+
+- name: Restart pulpito if necessary
+  supervisorctl:
+    name: pulpito
+    state: restarted
+  when: pulpito_status.stdout|match('.*RUNNING.*') and pulpito_config|changed
 
 - name: Wait for pulpito to start
   wait_for: