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
1 changed files with 11 additions and 6 deletions

View File

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