Added restart to the argument condition for AIX (#76841)

* Added restart to the argument condition for AIX

This should fix the issue https://github.com/ansible/ansible/issues/76840
pull/76858/head
neikei 3 years ago committed by GitHub
parent e9ffcf3c85
commit 73dd2c3607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
bugfixes:
- service - Fixed service restarts with arguments on AIX.
(https://github.com/ansible/ansible/issues/76840)

@ -1593,7 +1593,7 @@ class AIX(Service):
self.execute_command("%s %s %s" % (self.stopsrc_cmd, srccmd_parameter, self.name))
srccmd = self.startsrc_cmd
if self.arguments and self.action == 'start':
if self.arguments and self.action in ('start', 'restart'):
return self.execute_command("%s -a \"%s\" %s %s" % (srccmd, self.arguments, srccmd_parameter, self.name))
else:
return self.execute_command("%s %s %s" % (srccmd, srccmd_parameter, self.name))

Loading…
Cancel
Save