From 5bbf93cd7627a476831fbd408ab6740119e821f6 Mon Sep 17 00:00:00 2001 From: Mike Carden Date: Tue, 2 Aug 2016 14:48:33 +1000 Subject: [PATCH] Fix ansible performance issue An Ansible performance issue has been found when a task that contains iterable variables is included in a task that uses a higher level conditional. This patch breaks the task out into individual tasks to remove the delay. Change-Id: Icc872a84a822dc0853a0a55d6913bf00a39c75c9 --- tasks/neutron_init_systemd.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tasks/neutron_init_systemd.yml b/tasks/neutron_init_systemd.yml index 45d2ade6..4424a7d0 100644 --- a/tasks/neutron_init_systemd.yml +++ b/tasks/neutron_init_systemd.yml @@ -13,16 +13,27 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Create neutron TEMP dirs +- name: Create neutron TEMP run dir file: - path: "{{ item.path }}/{{ program_name }}" + path: "/var/run/{{ program_name }}" state: directory owner: "{{ system_user }}" group: "{{ system_group }}" mode: 02755 - with_items: - - { path: "/var/run" } - - { path: "/var/lock" } + tags: + - systemd-init + - neutron-init + +- name: Create neutron TEMP lock dir + file: + path: "/var/lock/{{ program_name }}" + state: directory + owner: "{{ system_user }}" + group: "{{ system_group }}" + mode: 02755 + tags: + - systemd-init + - neutron-init - name: Create tempfile.d entry template: