-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from enix/haproxy_pinning
Implement haproxy pkg pinning
- Loading branch information
Showing
4 changed files
with
29 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
dependencies: | ||
- role: packages_common | ||
- role: apiserver_docker_common | ||
- role: common_vars |
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 |
---|---|---|
@@ -1,6 +1,31 @@ | ||
--- | ||
- name: 'Get version of kubelet package' | ||
package_facts: | ||
|
||
- name: 'find version of kubeadm to install' | ||
pkg_version_match: | ||
name: haproxy | ||
version: '{{ _apiserver_proxy_haproxy_version }}' | ||
when: | ||
- not(haproxy_repo_just_added is changed and ansible_check_mode) | ||
- packages.haproxy|default([])|select('match', _apiserver_proxy_haproxy_version)|list|length == 0 | ||
register: haproxy_version | ||
|
||
- name: "Create pinning files" | ||
copy: | ||
dest: /etc/apt/preferences.d/50-haproxy | ||
content: | | ||
package: haproxy | ||
Pin: version {% if haproxy_version is not skipped -%} | ||
{{ haproxy_version.version }} | ||
{%- else -%} | ||
{{ packages.haproxy.0.version|default('dry-run-unknown') }} | ||
{%- endif %} | ||
Pin-Priority: 1001 | ||
- name: 'Install HAProxy package' | ||
apt: | ||
name: 'haproxy={{ _apiserver_proxy_haproxy_version }}' | ||
name: 'haproxy' | ||
state: 'present' | ||
when: not(haproxy_repo_just_added is changed and ansible_check_mode) |
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
File renamed without changes.