-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make version pinning optional (#97)
The ansible role was pinning the versions of dokku-related apt packages. In order to use the role with newer (or older) dokku versions, users of the role would have to figure out by themselves which versions of these packages were compatible - despite the fact that a simple `apt-get install dokku` would have taken care of the dependencies correctly. Here we deprecate version pinning (to be removed in 07/2021) and turn it off by default (unless the user explicitly provides package versions). We introduce a new variable `dokku_packages_state` that accepts the values 'present' and 'latest' and defaults to 'present' (subsequent runs of the role therefore won't touch any of the packages installed). When users wish to upgrade their dokku installation via ansible, they can pass the value `latest`. Special case dokku-daemon: dokku daemon is installed directly from GitHub and doesn't release that often - safer to stick to a version than to switch to the master branch.
- Loading branch information
Showing
6 changed files
with
114 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- name: pin dokku packages where requested | ||
copy: | ||
dest: /etc/apt/preferences.d/ansible-hold-{{ item.key }} | ||
content: | | ||
Package: {{ item.key }} | ||
Pin: version {{ item.value }} | ||
Pin-Priority: 1001 | ||
mode: 0644 | ||
when: item.value | ||
|
||
- name: remove pins from 'unpinned' dokku packages | ||
file: | ||
path: /etc/apt/preferences.d/ansible-hold-{{ item.key }} | ||
state: absent | ||
when: not item.value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters