1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix git module parameters to conform to code standards

This commit is contained in:
James Tanner 2014-01-23 16:44:17 -05:00
parent 9e52d5a550
commit 86ba8f4dff
2 changed files with 9 additions and 9 deletions

View file

@ -10,7 +10,7 @@ Major features/changes:
* only_if, which is much older than when_foo and was deprecated, is similarly removed. * only_if, which is much older than when_foo and was deprecated, is similarly removed.
* ssh connection plugin is now more efficient if you add 'pipelining=True' in ansible.cfg under [ssh_connection], see example.cfg * ssh connection plugin is now more efficient if you add 'pipelining=True' in ansible.cfg under [ssh_connection], see example.cfg
* localhost/127.0.0.1 is not required to be in inventory if referenced, if not in inventory, it does not implicitly appear in the 'all' group. * localhost/127.0.0.1 is not required to be in inventory if referenced, if not in inventory, it does not implicitly appear in the 'all' group.
* git module now takes sshopts and keyfile parameters to override how git calls ssh * git module now takes ssh_opts and key_file parameters to override how git calls ssh
New modules: New modules:

View file

@ -49,7 +49,7 @@ options:
version_added: "1.5" version_added: "1.5"
description: description:
- Add the hostkey for the repo url if not already added. - Add the hostkey for the repo url if not already added.
sshopts: ssh_opts:
required: false required: false
default: None default: None
version_added: "1.5" version_added: "1.5"
@ -57,13 +57,13 @@ options:
- Creates a wrapper script and exports the path as GIT_SSH - Creates a wrapper script and exports the path as GIT_SSH
which git then automatically uses to override ssh arguments. which git then automatically uses to override ssh arguments.
An example value could be "-o StrictHostKeyChecking=no" An example value could be "-o StrictHostKeyChecking=no"
keyfile: key_file:
requird: false requird: false
default: None default: None
version_added: "1.5" version_added: "1.5"
description: description:
- Uses the same wrapper method as sshopts to pass - Uses the same wrapper method as ssh_opts to pass
"-i <keyfile>" to the ssh arguments used by git "-i <key_file>" to the ssh arguments used by git
reference: reference:
required: false required: false
default: null default: null
@ -414,8 +414,8 @@ def main():
depth=dict(default=None, type='int'), depth=dict(default=None, type='int'),
update=dict(default='yes', type='bool'), update=dict(default='yes', type='bool'),
accept_hostkey=dict(default='no', type='bool'), accept_hostkey=dict(default='no', type='bool'),
keyfile=dict(default=None, required=False), key_file=dict(default=None, required=False),
sshopts=dict(default=None, required=False), ssh_opts=dict(default=None, required=False),
executable=dict(default=None), executable=dict(default=None),
bare=dict(default='no', type='bool'), bare=dict(default='no', type='bool'),
), ),
@ -433,8 +433,8 @@ def main():
reference = module.params['reference'] reference = module.params['reference']
git_path = module.params['executable'] or module.get_bin_path('git', True) git_path = module.params['executable'] or module.get_bin_path('git', True)
key_file = module.params['keyfile'] key_file = module.params['key_file']
ssh_opts = module.params['sshopts'] ssh_opts = module.params['ssh_opts']
# create a wrapper script and export # create a wrapper script and export
# GIT_SSH=<path> as an environment variable # GIT_SSH=<path> as an environment variable