Skip to content

Conversation

@zachelnet
Copy link

Refactor the generation of /etc/docker/daemon.json from a template approach to direct YAML-to-JSON conversion using Ansible functions.

@zachelnet zachelnet force-pushed the docker/refactoring-daemon-json branch from d457701 to d877239 Compare November 26, 2025 23:34
@zachelnet zachelnet marked this pull request as draft November 26, 2025 23:35
@zachelnet zachelnet force-pushed the docker/refactoring-daemon-json branch 4 times, most recently from 4e810c3 to c4b2796 Compare November 27, 2025 10:59
@ghost
Copy link

ghost commented Nov 27, 2025

I changed back to template and added following code:

{% if docker_default_ulimits is defined and docker_default_ulimits | length > 0 %}
    "default-ulimits": {
{% for ulimit_name, ulimit_values in docker_default_ulimits.items() %}
        "{{ ulimit_name }}": {
            "Name": "{{ ulimit_values.Name }}",
            "Soft": {{ ulimit_values.Soft }},
            "Hard": {{ ulimit_values.Hard }}
        }{% if not loop.last %},{% endif %}
{% endfor %}

    },
{% endif %}

@zachelnet zachelnet marked this pull request as ready for review November 28, 2025 07:51
zachelnet and others added 2 commits November 28, 2025 10:42
remove "comment out defaults"

Signed-off-by: Martin Zach <[email protected]>
@zachelnet zachelnet force-pushed the docker/refactoring-daemon-json branch from 4986e59 to 5cb56f8 Compare November 28, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant