File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1616}
1717
1818
19- def get_pkgs_to_install ():
19+ def get_pkgs_to_install (operator ):
2020 docker_packages = [
2121 "docker-ce" ,
2222 "docker-ce-cli" ,
@@ -25,7 +25,7 @@ def get_pkgs_to_install():
2525 if not host .data .docker_version :
2626 return docker_packages
2727
28- return [f"{ pkg } = { host .data .docker_version } " for pkg in docker_packages ]
28+ return [f"{ pkg } { operator } { host .data .docker_version } " for pkg in docker_packages ]
2929
3030
3131
@@ -93,10 +93,11 @@ def deploy_docker(config=None):
9393 config: filename or dict of JSON data
9494 """
9595
96- packages = get_pkgs_to_install ()
9796 if host .get_fact (DebPackages ):
97+ packages = get_pkgs_to_install ('=' )
9898 _apt_install (packages )
9999 elif host .get_fact (RpmPackages ):
100+ packages = get_pkgs_to_install ('-' )
100101 _yum_or_dnf_install (
101102 dnf if host .get_fact (Which , command = "dnf" ) else yum ,
102103 packages ,
You can’t perform that action at this time.
0 commit comments