nickjj / ansible-docker

Install / Configure Docker and Docker Compose using Ansible.
MIT License
750 stars 224 forks source link

Set up config before installing #81

Closed pcolmer closed 4 years ago

pcolmer commented 4 years ago

This moves the creation of daemon.json to before Docker gets installed. This ensures that if graph is defined then Docker immediately uses it and initialises its workspace in the desired location.

Note that this change does not support graph being changed after Docker has been installed. More work is required for that :)

nickjj commented 4 years ago

Hi,

Thanks for the contribution.

But what made you decide to split up the tasks for both configuration directories?

pcolmer commented 4 years ago

But what made you decide to split up the tasks for both configuration directories?

Lack of knowledge on my part, to be honest, combined with wanting to change as little as possible.

I know what happens if I initialise daemon.json before Docker gets installed, but I don't know enough about what the other configuration bits are doing to be certain of the impact if I move those bits around.

nickjj commented 4 years ago

When in doubt, changing as little as possible is a good plan.

I'd be curious to see what would happen if you put both of them back together. I think there's a very high chance it will work with them together. One less task is always nice from both a maintainability and performance POV when it comes to Ansible.

pcolmer commented 4 years ago

I've tested this with the recombined config directory creation and it doesn't affect the installation of Docker.

nickjj commented 4 years ago

Thanks, can you also update the CHANGELOG.md, by changing it from this:

## Next release

- **Backwards incompatible change:** `python-docker` was renamed to `python3-docker`
- Fix symlink related issues with virtualenv when using virtualenv 20+
- Remove all support for Python 2.x
- Officially remove support for Ubuntu 16.04

To this:

## Next release

- **Backwards incompatible change:** `python-docker` was renamed to `python3-docker`
- Fix symlink related issues with virtualenv when using virtualenv 20+
- Configure daemon before installing Docker to allow customizing certain things
- Remove all support for Python 2.x
- Officially remove support for Ubuntu 16.04

You may need to pull the current master branch down locally to get the updated changelog since I updated it the other day.

Once that's done, we should be good to go.

pcolmer commented 4 years ago

@nickjj I've made the change to CHANGELOG.md as requested.

nickjj commented 4 years ago

Done and merged. Thanks!