apt module fails with serial setting greater than 1

Hello everyone,

I’m just starting to use ansible and encountered weird issue.

apt module on target machines that run ubuntu 16.04 (ec2 image ami-1967056a) fails with locking issues (11: Resource temporarily unavailable).

But when I set serial: 1 everything seems to be fine. I’m not sure where to look for a solution. Is it ansible problem or apt related?

Any help or suggestions are welcome!

Thanks a lot!

In general you can only run one apt process on the same machine, the
'locking' is apt trying to ensure that.