dokku / ansible-dokku

Ansible modules for installing and configuring Dokku
MIT License
169 stars 44 forks source link

dokku_clone: add `version` parameter and switch to `git:sync` #98

Closed ltalirz closed 3 years ago

ltalirz commented 3 years ago

fixes #88 fixes #94

Use new git:sync command under the hood for dokku_clone. Also, start reusing code between modules by placing code inside the module_utils folder. Further additions for fixing tests during the verify stage.

Note: This requires dokku >= 0.23.0 and will break the dokku_clone command for previous dokku releases. I therefore suggest to

ltalirz commented 3 years ago

Ran into a molecule bug. Opened https://github.com/ansible-community/molecule/issues/3045

caillou commented 3 years ago

Would it makes sense to expose the --build option of dokku git:sync? C.f. documentations:

By default, this command [dokku git:sync] does not trigger an application build. To do so during a git:sync, specify the --build flag.

ltalirz commented 3 years ago

thanks for the suggestion @caillou , that would seem to make a lot of sense.

I finally got a reply on the molecule issue some time ago, just haven't found the time to sit down and try the fixes. I'll try to make the time in the coming days and get this merged

ltalirz commented 3 years ago

P.S. Would you be interested in reviewing this PR once it's ready?

ltalirz commented 3 years ago

hi @caillou , I finally found the time to get back to this PR. I've now switched to the --build option of git:sync, would you mind giving this a review to see whether it fits what you had in mind?

dokku_clone will remain building by default but it can now be turned off by passing build: false.

You don't necessarily need to go through all changes; I'm mainly concerned with library/dokku_clone.py

ltalirz commented 3 years ago

@josegonzalez if you manage to have a quick look at library/dokku_clone.py as well that may be useful

I'll probably merge this tomorrow since it's going to be useful for the blog article

ltalirz commented 3 years ago

I'm going ahead and merging this; happy to include updates in follow-up PRs.