diff --git a/playbooks/roles/os_swift/handlers/main.yml b/playbooks/roles/os_swift/handlers/main.yml index 97b662392a..2cea1ee8e9 100644 --- a/playbooks/roles/os_swift/handlers/main.yml +++ b/playbooks/roles/os_swift/handlers/main.yml @@ -62,21 +62,18 @@ name: "rsyslog" state: "restarted" -- name: Restart rsync service +- name: Ensure rsync service stopped service: name: "rsync" state: "stopped" - pattern: "rsync" register: service_restart failed_when: "'msg' in service_restart and 'FAIL' in service_restart.msg|upper" register: service_restart until: add_service|success retries: 3 delay: 2 - notify: Ensure rsync service running - name: Ensure rsync service running service: name: "rsync" state: "started" - pattern: "rsync" diff --git a/playbooks/roles/os_swift/tasks/swift_storage_hosts_setup.yml b/playbooks/roles/os_swift/tasks/swift_storage_hosts_setup.yml index 335c3a7cb8..2db0748e5a 100644 --- a/playbooks/roles/os_swift/tasks/swift_storage_hosts_setup.yml +++ b/playbooks/roles/os_swift/tasks/swift_storage_hosts_setup.yml @@ -38,14 +38,14 @@ owner: "root" group: "root" mode: "0644" - notify: Restart rsync service + notify: ["Ensure rsync service stopped", "Ensure rsync service running"] - name: "Enable rsync in defaults" lineinfile: dest: "/etc/default/rsync" line: "RSYNC_ENABLE=true" regexp: "^RSYNC_ENABLE*" - notify: Restart rsync service + notify: ["Ensure rsync service stopped", "Ensure rsync service running"] # We need the location of swift-recon-cron - name: "Get location of swift-recon-cron"