mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Port arg specs from type='str' to type='path'
This commit is contained in:
parent
dc69af50dc
commit
75eed6a51a
12 changed files with 27 additions and 40 deletions
|
@ -204,9 +204,9 @@ class LoginManager(DockerBaseClass):
|
|||
'''
|
||||
|
||||
cmd = "%s logout " % self.client.module.get_bin_path('docker', True)
|
||||
#TODO: docker does not support config file in logout, restore this when they do
|
||||
#if self.config_path and self.config_file_exists(self.config_path):
|
||||
# cmd += "--config '%s' " % self.config_path
|
||||
# TODO: docker does not support config file in logout, restore this when they do
|
||||
# if self.config_path and self.config_file_exists(self.config_path):
|
||||
# cmd += "--config '%s' " % self.config_path
|
||||
cmd += "'%s'" % self.registry_url
|
||||
|
||||
(rc, out, err) = self.client.module.run_command(cmd)
|
||||
|
@ -250,7 +250,7 @@ class LoginManager(DockerBaseClass):
|
|||
:return: None
|
||||
'''
|
||||
|
||||
path = os.path.expanduser(self.config_path)
|
||||
path = self.config_path
|
||||
if not self.config_file_exists(path):
|
||||
self.create_config_file(path)
|
||||
|
||||
|
@ -291,14 +291,14 @@ class LoginManager(DockerBaseClass):
|
|||
|
||||
def main():
|
||||
|
||||
argument_spec=dict(
|
||||
argument_spec = dict(
|
||||
registry_url=dict(type='str', required=False, default=DEFAULT_DOCKER_REGISTRY, aliases=['registry', 'url']),
|
||||
username=dict(type='str', required=False),
|
||||
password=dict(type='str', required=False, no_log=True),
|
||||
email=dict(type='str'),
|
||||
reauthorize=dict(type='bool', default=False, aliases=['reauth']),
|
||||
state=dict(type='str', default='present', choices=['present', 'absent']),
|
||||
config_path=dict(type='str', default='~/.docker/config.json', aliases=['self.config_path', 'dockercfg_path']),
|
||||
config_path=dict(type='path', default='~/.docker/config.json', aliases=['self.config_path', 'dockercfg_path']),
|
||||
)
|
||||
|
||||
required_if = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue