-
Notifications
You must be signed in to change notification settings - Fork 95
Description
I'm trying to apply the docker rootless setup across all of our molecule tests so that missing privilege escalation on tasks is picked up earlier than actual deployment.
Since I want to apply this to all of my tests, I'd like to be able to make a change/define it in one place (e.g. somewhere like ~/.config/molecule/config.yml
) as a default that could be overridden on a test-by-test basis. I can do this for the ansible_user
, but the docker driver only looks for custom Dockerfile.j2
templates relative to the molecule scenario directory, and the path is picked up off platforms[*].dockerfile
, so it's a little more awkward to do globally:
path: "{{ molecule_scenario_directory + '/' + (item.dockerfile | default('Dockerfile.j2')) }}" |
What do you think about adding the extra ansible user & sudo config to the default Dockerfile.j2
? Either always applied (it shouldn't break the default behaviour of running as root) or behind some kind of flag that could be passed to the driver?