From d1eb67d6891fe506acf1ce1a2fc32f5098be8a98 Mon Sep 17 00:00:00 2001 From: Jonathan Mainguy Date: Sat, 12 Oct 2013 13:28:48 -0400 Subject: [PATCH] Changed resp= to response_file= as per mpdehaan's request --- packaging/svr4pkg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packaging/svr4pkg b/packaging/svr4pkg index e3c25bfac3a..5abf6b56df1 100644 --- a/packaging/svr4pkg +++ b/packaging/svr4pkg @@ -53,7 +53,7 @@ options: proxy: description: - HTTP[s] proxy to be used if C(src) is a URL. - resp: + response_file: description: - Specifies the location of a response file to be used if package expects input on install. ''' @@ -66,7 +66,7 @@ EXAMPLES = ''' - svr4pkg: name=CSWpkgutil src=http://get.opencsw.org/now state=present # Install a package with a response file -- svr4pkg: name=CSWggrep src=/tmp/third-party.pkg resp=/tmp/ggrep.response state=present +- svr4pkg: name=CSWggrep src=/tmp/third-party.pkg response_file=/tmp/ggrep.response state=present # Ensure that a package is not installed. - svr4pkg: name=SUNWgnome-sound-recorder state=absent @@ -115,13 +115,13 @@ def run_command(module, cmd): cmd[0] = module.get_bin_path(progname, True) return module.run_command(cmd) -def package_install(module, name, src, proxy, resp): +def package_install(module, name, src, proxy, response_file): adminfile = create_admin_file() cmd = [ 'pkgadd', '-na', adminfile, '-d', src ] if proxy is not None: cmd += [ '-x', proxy ] - if resp is not None: - cmd += [ '-r', resp ] + if response_file is not None: + cmd += [ '-r', response_file ] cmd.append(name) (rc, out, err) = run_command(module, cmd) os.unlink(adminfile) @@ -141,7 +141,7 @@ def main(): state = dict(required = True, choices=['present', 'absent']), src = dict(default = None), proxy = dict(default = None), - resp = dict(default = None) + response_file = dict(default = None) ), supports_check_mode=True ) @@ -149,7 +149,7 @@ def main(): name = module.params['name'] src = module.params['src'] proxy = module.params['proxy'] - resp = module.params['resp'] + response_file = module.params['response_file'] rc = None out = '' err = '' @@ -164,7 +164,7 @@ def main(): if not package_installed(module, name): if module.check_mode: module.exit_json(changed=True) - (rc, out, err) = package_install(module, name, src, proxy, resp) + (rc, out, err) = package_install(module, name, src, proxy, response_file) # Stdout is normally empty but for some packages can be # very long and is not often useful if len(out) > 75: