diff options
author | Kate Case <kcase@redhat.com> | 2023-01-25 08:37:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 08:37:58 -0500 |
commit | e9911888f6dcdf9031f3fdb2e32c52e45815fdbe (patch) | |
tree | dc22abb4a329ef04e98685b81d074679dc24c456 /plugins/modules/vyos_user.py | |
parent | bcfe61a3b6ff69f08450f3dbd8f0f1827fb18ab3 (diff) | |
download | vyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.tar.gz vyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.zip |
Add prettier and isort to pre-commit. (#270)
* Add prettier and isort to pre-commit.
* Bump line-length to 100
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'plugins/modules/vyos_user.py')
-rw-r--r-- | plugins/modules/vyos_user.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/modules/vyos_user.py b/plugins/modules/vyos_user.py index b2e1acc7..5494df3f 100644 --- a/plugins/modules/vyos_user.py +++ b/plugins/modules/vyos_user.py @@ -181,26 +181,24 @@ commands: """ import re - from copy import deepcopy from functools import partial from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.six import iteritems from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import ( remove_default_spec, ) + from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import ( get_config, load_config, ) -from ansible.module_utils.six import iteritems def validate_level(value, module): if value not in ("admin", "operator"): - module.fail_json( - msg="level must be either admin or operator, got %s" % value - ) + module.fail_json(msg="level must be either admin or operator, got %s" % value) def spec_to_commands(updates, module): @@ -231,8 +229,7 @@ def spec_to_commands(updates, module): add( commands, want, - "authentication plaintext-password %s" - % want["configured_password"], + "authentication plaintext-password %s" % want["configured_password"], ) return commands @@ -338,9 +335,7 @@ def main(): full_name=dict(), level=dict(aliases=["role"]), configured_password=dict(no_log=True), - update_password=dict( - default="always", choices=["on_create", "always"] - ), + update_password=dict(default="always", choices=["on_create", "always"]), state=dict(default="present", choices=["present", "absent"]), ) |