mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 21:30:22 -07:00
PEP8 fixes: Ansible system module and playbook base.py (#32322)
* Ansible files module sanity pep8 fixes * Ansible system module and playbook base.py * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Undo empty lines not required by sanity checks * Various changes * Various changes * Various changes * Various changes * Undo blank lines not required by sanity checks * Various changes * Various changes * Various changes * Various changes * Various changes * Undo blank line changes not required by sanity checks * Various changes * Various changes * Various changes * Various changes * Various changes * Missing piece after merge * Blank lines * Blank line * Line too long * Fix typo * Unnecessary quotes * Fix example error
This commit is contained in:
parent
a5da2e44a1
commit
a2d34e914e
31 changed files with 878 additions and 1004 deletions
|
@ -1081,7 +1081,7 @@ class OpenBSDUser(User):
|
|||
cmd.append(self.login_class)
|
||||
|
||||
if self.update_password == 'always' and self.password is not None \
|
||||
and self.password != '*' and info[1] != self.password:
|
||||
and self.password != '*' and info[1] != self.password:
|
||||
cmd.append('-p')
|
||||
cmd.append(self.password)
|
||||
|
||||
|
@ -1093,8 +1093,6 @@ class OpenBSDUser(User):
|
|||
return self.execute_command(cmd)
|
||||
|
||||
|
||||
# ===========================================
|
||||
|
||||
class NetBSDUser(User):
|
||||
"""
|
||||
This is a NetBSD User manipulation class.
|
||||
|
@ -1250,8 +1248,6 @@ class NetBSDUser(User):
|
|||
return self.execute_command(cmd)
|
||||
|
||||
|
||||
# ===========================================
|
||||
|
||||
class SunOS(User):
|
||||
"""
|
||||
This is a SunOS User manipulation class - The main difference between
|
||||
|
@ -1613,7 +1609,7 @@ class DarwinUser(User):
|
|||
(rc, out, err) = self.execute_command(cmd)
|
||||
if rc != 0:
|
||||
self.module.fail_json(msg='Cannot %s user "%s" to group "%s".'
|
||||
% (action, self.name, group), err=err, out=out, rc=rc)
|
||||
% (action, self.name, group), err=err, out=out, rc=rc)
|
||||
return (rc, out, err)
|
||||
|
||||
def _modify_group(self):
|
||||
|
@ -1681,7 +1677,7 @@ class DarwinUser(User):
|
|||
return 0
|
||||
else:
|
||||
if self.name in hidden_users:
|
||||
del(hidden_users[hidden_users.index(self.name)])
|
||||
del (hidden_users[hidden_users.index(self.name)])
|
||||
|
||||
cmd = ['defaults', 'write', plist_file, 'HiddenUsersList', '-array'] + hidden_users
|
||||
(rc, out, err) = self.execute_command(cmd)
|
||||
|
@ -1784,7 +1780,7 @@ class DarwinUser(User):
|
|||
if rc != 0:
|
||||
self.module.fail_json(
|
||||
msg='Cannot update property "%s" for user "%s".'
|
||||
% (field[0], self.name), err=err, out=out, rc=rc)
|
||||
% (field[0], self.name), err=err, out=out, rc=rc)
|
||||
changed = rc
|
||||
out += _out
|
||||
err += _err
|
||||
|
@ -2242,6 +2238,7 @@ def main():
|
|||
|
||||
module.exit_json(**result)
|
||||
|
||||
|
||||
# import module snippets
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue