@@ -32,6 +32,20 @@ class DepsInstaller:
3232 "bash" : "bash" ,
3333 "which" : "which" ,
3434 "tar" : "tar" ,
35+ "xz" : [
36+ {
37+ "name" : "Install xz-utils (Debian)" ,
38+ "package" : {"name" : ["xz-utils" ], "state" : "present" },
39+ "become" : True ,
40+ "when" : "ansible_facts['os_family'] == 'Debian'" ,
41+ },
42+ {
43+ "name" : "Install xz (Non-Debian)" ,
44+ "package" : {"name" : ["xz" ], "state" : "present" },
45+ "become" : True ,
46+ "when" : "ansible_facts['os_family'] != 'Debian'" ,
47+ },
48+ ],
3549 # debian why are you like this
3650 "7z" : [
3751 {
@@ -53,6 +67,44 @@ class DepsInstaller:
5367 "when" : "ansible_facts['distribution'] == 'Fedora'" ,
5468 },
5569 ],
70+ # to compile just about any tool, we need the openssl dev headers
71+ "openssl" : [
72+ {
73+ "name" : "Install OpenSSL library and development headers (Debian/Ubuntu)" ,
74+ "package" : {"name" : ["libssl-dev" , "openssl" ], "state" : "present" },
75+ "become" : True ,
76+ "when" : "ansible_facts['os_family'] == 'Debian'" ,
77+ "ignore_errors" : True ,
78+ },
79+ {
80+ "name" : "Install OpenSSL library and development headers (RedHat/CentOS/Fedora)" ,
81+ "package" : {"name" : ["openssl" , "openssl-devel" ], "state" : "present" },
82+ "become" : True ,
83+ "when" : "ansible_facts['os_family'] == 'RedHat' or ansible_facts['os_family'] == 'Suse' " ,
84+ "ignore_errors" : True ,
85+ },
86+ {
87+ "name" : "Install OpenSSL library and development headers (Arch)" ,
88+ "package" : {"name" : ["openssl" ], "state" : "present" },
89+ "become" : True ,
90+ "when" : "ansible_facts['os_family'] == 'Archlinux'" ,
91+ "ignore_errors" : True ,
92+ },
93+ {
94+ "name" : "Install OpenSSL library and development headers (Alpine)" ,
95+ "package" : {"name" : ["openssl" , "openssl-dev" ], "state" : "present" },
96+ "become" : True ,
97+ "when" : "ansible_facts['os_family'] == 'Alpine'" ,
98+ "ignore_errors" : True ,
99+ },
100+ {
101+ "name" : "Install OpenSSL library and development headers (FreeBSD)" ,
102+ "package" : {"name" : ["openssl" ], "state" : "present" },
103+ "become" : True ,
104+ "when" : "ansible_facts['os_family'] == 'FreeBSD'" ,
105+ "ignore_errors" : True ,
106+ },
107+ ],
56108 }
57109
58110 def __init__ (self , parent_helper ):
@@ -171,11 +223,6 @@ async def install_module(self, module):
171223 success = True
172224 preloaded = self .all_modules_preloaded [module ]
173225
174- # ansible tasks
175- ansible_tasks = preloaded ["deps" ]["ansible" ]
176- if ansible_tasks :
177- success &= self .tasks (module , ansible_tasks )
178-
179226 # apt
180227 deps_apt = preloaded ["deps" ]["apt" ]
181228 if deps_apt :
@@ -196,7 +243,7 @@ async def install_module(self, module):
196243 deps_common = preloaded ["deps" ]["common" ]
197244 if deps_common :
198245 for dep_common in deps_common :
199- if self .setup_status .get (dep_common , False ) is True :
246+ if self .setup_status .get (dep_common , False ) is True and self . deps_behavior != "force_install" :
200247 log .debug (
201248 f'Skipping installation of dependency "{ dep_common } " for module "{ module } " since it is already installed'
202249 )
@@ -206,6 +253,11 @@ async def install_module(self, module):
206253 self .setup_status [dep_common ] = result
207254 success &= result
208255
256+ # ansible tasks
257+ ansible_tasks = preloaded ["deps" ]["ansible" ]
258+ if ansible_tasks :
259+ success &= self .tasks (module , ansible_tasks )
260+
209261 return success
210262
211263 async def pip_install (self , packages , constraints = None ):
0 commit comments