mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add -i, -k, and -M to ansible-playbook CLI to match options in /usr/bin/ansible
This commit is contained in:
@@ -242,8 +242,7 @@ class PlayBook(object):
|
||||
handlers = pg['handlers']
|
||||
user = pg.get('user', C.DEFAULT_REMOTE_USER)
|
||||
|
||||
host_file = pg.get('inventory', '/etc/ansible/hosts')
|
||||
self.host_list, groups = ansible.runner.Runner.parse_hosts(host_file)
|
||||
self.host_list, groups = ansible.runner.Runner.parse_hosts(self.host_list)
|
||||
|
||||
if self.verbose:
|
||||
print "PLAY [%s] ****************************\n" % pattern
|
||||
|
||||
@@ -272,10 +272,11 @@ class Runner(object):
|
||||
# module, call the appropriate executor function
|
||||
|
||||
ok, conn = self._connect(host)
|
||||
if not ok:
|
||||
return [ host, False, conn ]
|
||||
|
||||
tmp = self._get_tmp_path(conn)
|
||||
result = None
|
||||
if not ok:
|
||||
result = [ host, False, conn ]
|
||||
if self.module_name not in [ 'copy', 'template' ]:
|
||||
result = self._execute_normal_module(conn, host, tmp)
|
||||
elif self.module_name == 'copy':
|
||||
|
||||
Reference in New Issue
Block a user