I'm running Ansible 2.2, but can upgrade if it helps.
I saw this and was pretty excited, but it doesn't seem to be in this (or any) version of Ansible documentation.
The problem I'm trying to solve is I've got 1000 users that I need to manage on a Centos box.
It takes quite a while to run this task serially. And even more annoying, everything shows up as changed because the "expires" command on the user module always marks the thing as changed.
this also looked promising, but it took the same amount of time to run each command in the with_items loop and didn't go any faster (I never bothered to wait long enough to get to the end).
Skipping tasks is fast now (a lot faster than it was in Ansible 2.0), if I can't figure out how to make this work in parallel, I think I'll go back and figure out how to skip pointless tasks and if all else fails, I'll write my own module. But it seems like I should be able to do all this faster in Ansible.
This is what I want to run in parallel, host_authorizations
is a list of usernames and other data.
- name: Create/modify OS user accounts
user: name={{ item.username }} group=sshusers shell=/bin/bash home="/home/selinux-modules/{{ item.username }}" state=present expires={{item.expiredate|default(omit)}}
with_items: "{{ host_authorizations }}"
tags: full_maintenance