/
/
A minimal, reusable Ansible role that creates the base Docker directory structure with proper permissions and ownership for all service deployments.
This role follows the KISS principle and has one job: create /docker
directory with correct permissions. Nothing more, nothing less.
/docker
directory with ansible:users
ownership0775
g+s
) for permission inheritanceInclude this role in your playbooks before any service roles that need Docker directories:
roles:
- role: geerlingguy.docker
tags: docker
- role: docker-framework
tags: [docker-framework, docker]
- role: connectivity # or storage, runner, etc.
tags: services
All variables have sensible defaults and rarely need to be overridden:
Variable | Default | Description |
---|---|---|
docker_framework_base_path |
/docker |
Base Docker directory path |
docker_framework_owner |
ansible |
Directory owner |
docker_framework_group |
users |
Directory group |
docker_framework_mode |
0775 |
Directory permissions |
docker_framework_sgid |
true |
Enable group sticky bit |
/docker/
âââ owner: ansible
âââ group: users
âââ mode: 0775 + g+s
âââ (service-specific subdirectories created by service roles)
docker-framework
: All tasksdirectories
: Directory creationpermissions
: Permission setupusers
: User group managementvalidate
: Validation tasksThis role embodies the Unix philosophy: "Do one thing and do it well." It provides a solid, reusable foundation that all service deployment roles can depend on without complexity or bloat.