Skip to content

Driver Docker missing ulimits #1091

@robertdebock

Description

@robertdebock

Feature request

Allow molecule to set ulimit values for the Docker Driver.

Molecule and Ansible details

ansible --version
ansible 2.4.2.0
  config file = None
  configured module search path = [u'/Users/yf30lg/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
  executable location = /Users/yf30lg/Library/Python/2.7/bin/ansible
  python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
molecule --version
molecule, version 2.6.0
  • Molecule installation method: pip
  • Ansible installation method: pip

Desired Behaviour

In some cases it may be required to set a different ulimit for a Docker instance. For example "nofile". The Ansible module Docker Container allows this using the list "ulimits".

I'll prepare a merge request and link it to this feature request.

A hint of what work on my laptop now:

molecule.yml:

...
  - name: release-centos-6
    image: centos:6
    ulimits:
      - nofile:262144:262144
...

create.yml:

    - name: Create molecule instance(s)
      docker_container:
...
        ulimits: "{{ item.ulimits | default(omit) }}"
      with_items: "{{ molecule_yml.platforms }}"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions