|
|
@ -1137,6 +1137,9 @@ class SunOS(User):
|
|
|
|
|
|
|
|
|
|
|
|
cmd.append(self.name)
|
|
|
|
cmd.append(self.name)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.module.check_mode:
|
|
|
|
|
|
|
|
return (0, '', '')
|
|
|
|
|
|
|
|
else:
|
|
|
|
(rc, out, err) = self.execute_command(cmd)
|
|
|
|
(rc, out, err) = self.execute_command(cmd)
|
|
|
|
if rc is not None and rc != 0:
|
|
|
|
if rc is not None and rc != 0:
|
|
|
|
self.module.fail_json(name=self.name, msg=err, rc=rc)
|
|
|
|
self.module.fail_json(name=self.name, msg=err, rc=rc)
|
|
|
@ -1214,6 +1217,9 @@ class SunOS(User):
|
|
|
|
cmd.append('-s')
|
|
|
|
cmd.append('-s')
|
|
|
|
cmd.append(self.shell)
|
|
|
|
cmd.append(self.shell)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.module.check_mode:
|
|
|
|
|
|
|
|
return (0, '', '')
|
|
|
|
|
|
|
|
else:
|
|
|
|
# modify the user if cmd will do anything
|
|
|
|
# modify the user if cmd will do anything
|
|
|
|
if cmd_len != len(cmd):
|
|
|
|
if cmd_len != len(cmd):
|
|
|
|
cmd.append(self.name)
|
|
|
|
cmd.append(self.name)
|
|
|
|