From 4843ab093b30461ac13899220660331eda52cb3a Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 12 Feb 2018 16:25:55 -0500 Subject: [PATCH] Restart only when needed The role currently always restarts Magnum at the end of every run which is not ideal. This patch removes the restart at every run and adds a notify for configuration changes. Change-Id: Ia47d9983598598b5550d623df78aae616d8948a4 --- tasks/magnum_post_install.yml | 2 ++ tasks/main.yml | 10 ---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/tasks/magnum_post_install.yml b/tasks/magnum_post_install.yml index 54db8bc..aa81c67 100644 --- a/tasks/magnum_post_install.yml +++ b/tasks/magnum_post_install.yml @@ -35,6 +35,8 @@ destination: "{{ magnum_etc_directory }}/api-paste.ini" config_overrides: "{{ magnum_api_paste_ini_overrides }}" config_type: "ini" + notify: + - Restart magnum services - name: Download magnum images get_url: diff --git a/tasks/main.yml b/tasks/main.yml index 904815b..faf8218 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -49,15 +49,5 @@ tags: - magnum-config -- name: Restart Magnum Services - service: - name: "{{ item }}" - state: "restarted" - with_items: - - "{{ magnum_api_program_name }}" - - "{{ magnum_conductor_program_name }}" - tags: - - magnum-config - - name: Flush handlers meta: flush_handlers