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
This commit is contained in:
Mike Carden 2016-08-02 14:48:33 +10:00
parent 5c630ae50a
commit 5bbf93cd76

View File

@ -13,16 +13,27 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: Create neutron TEMP dirs - name: Create neutron TEMP run dir
file: file:
path: "{{ item.path }}/{{ program_name }}" path: "/var/run/{{ program_name }}"
state: directory state: directory
owner: "{{ system_user }}" owner: "{{ system_user }}"
group: "{{ system_group }}" group: "{{ system_group }}"
mode: 02755 mode: 02755
with_items: tags:
- { path: "/var/run" } - systemd-init
- { path: "/var/lock" } - 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 - name: Create tempfile.d entry
template: template: