mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
harcoding inventory/hosts when pulling from repo
return to pre 2.0 behaviour which did not factor inventory into the repo pull
This commit is contained in:
parent
eaf34fa2be
commit
7964a35918
1 changed files with 2 additions and 4 deletions
|
@ -160,15 +160,13 @@ class PullCLI(CLI):
|
||||||
if not self.options.fullclone:
|
if not self.options.fullclone:
|
||||||
repo_opts += ' depth=1'
|
repo_opts += ' depth=1'
|
||||||
|
|
||||||
|
|
||||||
path = module_loader.find_plugin(self.options.module_name)
|
path = module_loader.find_plugin(self.options.module_name)
|
||||||
if path is None:
|
if path is None:
|
||||||
raise AnsibleOptionsError(("module '%s' not found.\n" % self.options.module_name))
|
raise AnsibleOptionsError(("module '%s' not found.\n" % self.options.module_name))
|
||||||
|
|
||||||
bin_path = os.path.dirname(os.path.abspath(sys.argv[0]))
|
bin_path = os.path.dirname(os.path.abspath(sys.argv[0]))
|
||||||
cmd = '%s/ansible -i "%s" %s -m %s -a "%s" "%s"' % (
|
# hardcode local and inventory/host as this is just meant to fetch the repo
|
||||||
bin_path, inv_opts, base_opts, self.options.module_name, repo_opts, limit_opts
|
cmd = '%s/ansible -i "localhost," -c local %s -m %s -a "%s" all' % (bin_path, base_opts, self.options.module_name, repo_opts)
|
||||||
)
|
|
||||||
|
|
||||||
for ev in self.options.extra_vars:
|
for ev in self.options.extra_vars:
|
||||||
cmd += ' -e "%s"' % ev
|
cmd += ' -e "%s"' % ev
|
||||||
|
|
Loading…
Reference in a new issue