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: I3fd0ca52f730f5c09fc52aff7113ea572b2b0e0c
This commit is contained in:
Mike Carden 2016-08-02 14:16:30 +10:00
parent 00ecdbbf3c
commit 37436f3dab
1 changed files with 17 additions and 5 deletions

View File

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