As described here, ulimits can now be configured via this role.
{% if container.ulimits is defined %}
ulimits:
{% if container.ulimits.nproc is defined %}
nproc: {{ container.ulimits.nproc }}
{% endif %}
{% if container.ulimits.nofile is defined %}
nofile:
{% for param, value in container.ulimits.nofile.items() %}
{{ param }}: {{ value }}
{% endfor %}
{% endif %}
{% endif %}