Fix ansible performance issue

When a task is included, contains variables within the
include, and loads other tasks with conditionals that
iterate  (using a lookup plugin) Ansible will spinlock for
~30 seconds per item per task. To resolve this the iteration
using the lookup plugin was removed and the task broken out
into individual tasks.

Change-Id: I2f979c950217f85340fbb22a8c9151b5605753f7
This commit is contained in:
Jesse Pretorius 2016-08-02 09:19:33 +01:00
parent 3f96ca867d
commit c88ecfa826

View File

@ -13,16 +13,21 @@
# 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 ironic TEMP dirs - name: Create 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:
- { path: "/var/run" } - name: Create TEMP lock dir
- { path: "/var/lock" } file:
path: "/var/lock/{{ program_name }}"
state: directory
owner: "{{ system_user }}"
group: "{{ system_group }}"
mode: "02755"
- name: Create tempfile.d entry - name: Create tempfile.d entry
template: template: