Skip to content

Commit

Permalink
Add checkmk_agent__git_version_unsigned_fallback defaulting to False
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Apr 14, 2017
1 parent c47c902 commit 7af5764
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
11 changes: 9 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,19 @@ checkmk_agent__git_dest: '{{ "/usr/local/src/check-mk/" + checkmk_agent__git_rep
# This is done because Check_MK does not cryptographically
# signed their work and this role wants to comply with the
# `DebOps Software Source Policy <https://docs.debops.org/en/latest/debops-policy/docs/software-source-policy.html#software-installed-from-git-repositories>`__.
# Note that if no mapping for the used release is defined here, the role will
# fallback to using the unsigned git tag directly!
checkmk_agent__git_version_map:
'v1.2.6p12': 'cf2aaf2f7d60ca0445a239915bfc41aa6f3ee739'
'v1.2.6p20': '988e5d4e8fbcf9ac73365ffcfb2d12080c4ee052'
'v1.2.8p16': 'e5e216abca9a946a29eab94334be30cc146e7fec'

# ]]]
# .. envvar:: checkmk_agent__git_version_unsigned_fallback [[[
#
# Defines the behavior when a requested version is not specified in
# :envvar:`checkmk_agent__git_version_map`.
# When this is set to ``True`` and no mapping for the used release is found,
# the role will fallback to using the unsigned git tag directly!
checkmk_agent__git_version_unsigned_fallback: False
# ]]]
# .. envvar:: checkmk_agent__git_version [[[
#
Expand Down
10 changes: 7 additions & 3 deletions tasks/setup_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
git:
repo: '{{ checkmk_agent__git_repo }}'
dest: '{{ checkmk_agent__git_dest }}'
version: '{{ checkmk_agent__git_version_map["v" + checkmk_agent__register_package_dpkg_version.stdout.split("-")[0]]|d("v" + checkmk_agent__register_package_dpkg_version.stdout.split("-")[0])
if (checkmk_agent__git_version == "auto")
else (checkmk_agent__git_version_map[checkmk_agent__git_version]|d(checkmk_agent__git_version)) }}'
version: '{{ (checkmk_agent__git_version_map["v" + checkmk_agent__register_package_dpkg_version.stdout.split("-")[0]]|d("v" + checkmk_agent__register_package_dpkg_version.stdout.split("-")[0])
if (checkmk_agent__git_version == "auto")
else (checkmk_agent__git_version_map[checkmk_agent__git_version]|d(checkmk_agent__git_version)))
if (checkmk_agent__git_version_unsigned_fallback|bool)
else ((checkmk_agent__git_version_map["v" + checkmk_agent__register_package_dpkg_version.stdout.split("-")[0]]
if (checkmk_agent__git_version == "auto")
else (checkmk_agent__git_version_map[checkmk_agent__git_version]))) }}'
update: True
tags: [ 'role::checkmk_agent:plugins:get' ]

Expand Down

0 comments on commit 7af5764

Please sign in to comment.